3v4l.org

run code in 300+ PHP versions simultaneously
<?php function clean($s) { $s = ereg_replace("[áàâãª]","a",$s); $s = ereg_replace("[ÁÀÂÃ]","A",$s); $s = ereg_replace("[éèê]","e",$s); $s = ereg_replace("[ÉÈÊ]","E",$s); $s = ereg_replace("[íìî]","i",$s); $s = ereg_replace("[ÍÌÎ]","I",$s); $s = ereg_replace("[óòôõº]","o",$s); $s = ereg_replace("[ÓÒÔÕ]","O",$s); $s = ereg_replace("[úùû]","u",$s); $s = ereg_replace("[ÚÙÛ]","U",$s); $s = str_replace(" ","-",$s); $s = str_replace("ñ","n",$s); $s = str_replace("Ñ","N",$s); //para ampliar los caracteres a reemplazar agregar lineas de este tipo: //$s = str_replace("caracter-que-queremos-cambiar","caracter-por-el-cual-lo-vamos-a-cambiar",$s); return $s; } $a = "COLÃ?N 1391"; echo clean($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GRt5d
function name:  (null)
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   ASSIGN                                                   !0, 'COL%C3%83%C6%92%3FN+1391'
   24     1        INIT_FCALL                                               'clean'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
          5      > RETURN                                                   1

Function clean:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GRt5d
function name:  clean
number of ops:  81
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL_BY_NAME                                       'ereg_replace'
          2        SEND_VAL_EX                                              '%5B%C3%A1%C3%A0%C3%A2%C3%A3%C2%AA%5D'
          3        SEND_VAL_EX                                              'a'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0  $1      
          6        ASSIGN                                                   !0, $1
    5     7        INIT_FCALL_BY_NAME                                       'ereg_replace'
          8        SEND_VAL_EX                                              '%5B%C3%81%C3%80%C3%82%C3%83%5D'
          9        SEND_VAL_EX                                              'A'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0  $3      
         12        ASSIGN                                                   !0, $3
    6    13        INIT_FCALL_BY_NAME                                       'ereg_replace'
         14        SEND_VAL_EX                                              '%5B%C3%A9%C3%A8%C3%AA%5D'
         15        SEND_VAL_EX                                              'e'
         16        SEND_VAR_EX                                              !0
         17        DO_FCALL                                      0  $5      
         18        ASSIGN                                                   !0, $5
    7    19        INIT_FCALL_BY_NAME                                       'ereg_replace'
         20        SEND_VAL_EX                                              '%5B%C3%89%C3%88%C3%8A%5D'
         21        SEND_VAL_EX                                              'E'
         22        SEND_VAR_EX                                              !0
         23        DO_FCALL                                      0  $7      
         24        ASSIGN                                                   !0, $7
    8    25        INIT_FCALL_BY_NAME                                       'ereg_replace'
         26        SEND_VAL_EX                                              '%5B%C3%AD%C3%AC%C3%AE%5D'
         27        SEND_VAL_EX                                              'i'
         28        SEND_VAR_EX                                              !0
         29        DO_FCALL                                      0  $9      
         30        ASSIGN                                                   !0, $9
    9    31        INIT_FCALL_BY_NAME                                       'ereg_replace'
         32        SEND_VAL_EX                                              '%5B%C3%8D%C3%8C%C3%8E%5D'
         33        SEND_VAL_EX                                              'I'
         34        SEND_VAR_EX                                              !0
         35        DO_FCALL                                      0  $11     
         36        ASSIGN                                                   !0, $11
   10    37        INIT_FCALL_BY_NAME                                       'ereg_replace'
         38        SEND_VAL_EX                                              '%5B%C3%B3%C3%B2%C3%B4%C3%B5%C2%BA%5D'
         39        SEND_VAL_EX                                              'o'
         40        SEND_VAR_EX                                              !0
         41        DO_FCALL                                      0  $13     
         42        ASSIGN                                                   !0, $13
   11    43        INIT_FCALL_BY_NAME                                       'ereg_replace'
         44        SEND_VAL_EX                                              '%5B%C3%93%C3%92%C3%94%C3%95%5D'
         45        SEND_VAL_EX                                              'O'
         46        SEND_VAR_EX                                              !0
         47        DO_FCALL                                      0  $15     
         48        ASSIGN                                                   !0, $15
   12    49        INIT_FCALL_BY_NAME                                       'ereg_replace'
         50        SEND_VAL_EX                                              '%5B%C3%BA%C3%B9%C3%BB%5D'
         51        SEND_VAL_EX                                              'u'
         52        SEND_VAR_EX                                              !0
         53        DO_FCALL                                      0  $17     
         54        ASSIGN                                                   !0, $17
   13    55        INIT_FCALL_BY_NAME                                       'ereg_replace'
         56        SEND_VAL_EX                                              '%5B%C3%9A%C3%99%C3%9B%5D'
         57        SEND_VAL_EX                                              'U'
         58        SEND_VAR_EX                                              !0
         59        DO_FCALL                                      0  $19     
         60        ASSIGN                                                   !0, $19
   14    61        INIT_FCALL                                               'str_replace'
         62        SEND_VAL                                                 '+'
         63        SEND_VAL                                                 '-'
         64        SEND_VAR                                                 !0
         65        DO_ICALL                                         $21     
         66        ASSIGN                                                   !0, $21
   15    67        INIT_FCALL                                               'str_replace'
         68        SEND_VAL                                                 '%C3%B1'
         69        SEND_VAL                                                 'n'
         70        SEND_VAR                                                 !0
         71        DO_ICALL                                         $23     
         72        ASSIGN                                                   !0, $23
   16    73        INIT_FCALL                                               'str_replace'
         74        SEND_VAL                                                 '%C3%91'
         75        SEND_VAL                                                 'N'
         76        SEND_VAR                                                 !0
         77        DO_ICALL                                         $25     
         78        ASSIGN                                                   !0, $25
   19    79      > RETURN                                                   !0
   20    80*     > RETURN                                                   null

End of function clean

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.65 ms | 1403 KiB | 16 Q