<?php
$substituir = array('FURG.','MEC.','MEC','AUT.','AUT','EXEC.','CONV.','SED.','INTERC.','EXPRES.','CLASS.','SED ','HAT.','PREM.','F.POWER','POW.','FLEXP.','ADVANT.','ECONOF.','ECONOFLEX','EXPRES.','TIP.','COMF.','COMF','T.FLEX','T. FLEX','TOT.FLEX','T. FIELD','TIPTRON','HIGHLI.','I MOTION','I-MOTI.','TIPTR','STRONIC','LUG.','EXCLUS.','EXCL.','SEDÃ','C.STYLE','C.PLUS','C./','LIMIT.','ELEG.','KOMP.','AVANTGARD','TOUR.','EXECUT.','AVANGARDE','EVOL.','EVOLUT.','INT.','BLIND.','INTERC.','CUPÊ','CUPÉ','COUPÊ','SED.','PRIV.','EXPRES.','EXP.','RANGE R.EVOQUE','DISCOVERY4','RANGE R.','FREELANDER2');
$novo = array('FURGÃO','MANUAL','MANUAL','AUTOMÁTICO','AUTOMÁTICO','EXECUTIVE','CONVERSÍVEL','SEDAN','INTERCOOLER','EXPRESSION','CLASSIC','SEDAN ','HATCH','PREMIUM','FLEXPOWER','POWER','FLEXPOWER','ADVANTAGE','ECONO.FLEX','ECONO.FLEX','EXPRESSION','TIPTRONIC','COMFORTLINE','COMFORTLINE','TOTAL FLEX','TOTAL FLEX','TOTAL FLEX','TRACK & FIELD','TIPTRONIC','HIGHLINE','I-MOTION','I-MOTION','TIPTRONIC','S-TRONIC','LUGARES','EXCLUSIVE','EXCLUSIVE','SEDAN','COMFORT STYLE','COMFORT PLUS','COMFORT/','LIMITED','ELEGANCE','KOMPRESSOR','AVANTGARDE','TOURING','EXECUTIVE','AVANTGARDE','EVOLUTION','EVOLUTION','INTERCOOLER','BLINDADO','INTERCOOLER','COUPÉ','COUPÉ','COUPÉ','SEDAN','PRIVILÈGE','EXPRESSION','EXPRESSION','RANGE ROVER EVOQUE','DISCOVERY 4','RANGE ROVER','FREELANDER 2');
$padrao = '#\b(' . implode("|", $substituir) . ')\b#i';
for($i = 0; $i <count($substituir); $i++){
if(preg_match("/./",$substituir[$i]))
{
$substituir[$i] = '#//' . $substituir[$i]. '//#i';
} else {
$substituir[$i] = '#\b(' . $substituir[$i] . ')\b#i';
}
}
//$teste = array('/\b(CLASS.)\b/i');
//$teste2 = array('CLASSIC');
echo preg_replace($substituir,$novo,"CORSA SED CLASS.LIFE FLEXPOWER");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 11
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 23
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 11
Branch analysis from position: 32
Branch analysis from position: 11
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 11
Branch analysis from position: 32
Branch analysis from position: 11
filename: /in/puUhf
function name: (null)
number of ops: 39
compiled vars: !0 = $substituir, !1 = $novo, !2 = $padrao, !3 = $i
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
2 0 E > ASSIGN !0, <array>
3 1 ASSIGN !1, <array>
4 2 INIT_FCALL 'implode'
3 SEND_VAL '%7C'
4 SEND_VAR !0
5 DO_ICALL $6
6 CONCAT ~7 '%23%5Cb%28', $6
7 CONCAT ~8 ~7, '%29%5Cb%23i'
8 ASSIGN !2, ~8
6 9 ASSIGN !3, 0
10 > JMP ->29
7 11 > INIT_FCALL 'preg_match'
12 SEND_VAL '%2F.%2F'
13 FETCH_DIM_R ~11 !0, !3
14 SEND_VAL ~11
15 DO_ICALL $12
16 > JMPZ $12, ->23
9 17 > FETCH_DIM_R ~14 !0, !3
18 CONCAT ~15 '%23%2F%2F', ~14
19 CONCAT ~16 ~15, '%2F%2F%23i'
20 ASSIGN_DIM !0, !3
21 OP_DATA ~16
22 > JMP ->28
11 23 > FETCH_DIM_R ~18 !0, !3
24 CONCAT ~19 '%23%5Cb%28', ~18
25 CONCAT ~20 ~19, '%29%5Cb%23i'
26 ASSIGN_DIM !0, !3
27 OP_DATA ~20
6 28 > PRE_INC !3
29 > COUNT ~22 !0
30 IS_SMALLER !3, ~22
31 > JMPNZ ~23, ->11
16 32 > INIT_FCALL 'preg_replace'
33 SEND_VAR !0
34 SEND_VAR !1
35 SEND_VAL 'CORSA+SED+CLASS.LIFE+FLEXPOWER'
36 DO_ICALL $24
37 ECHO $24
38 > RETURN 1
Generated using Vulcan Logic Dumper, using php 8.0.0
preferences:
156.24 ms | 1400 KiB | 19 Q