3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 'COLÃ?N 1391'; function normalize_str($str) { $invalid = array(''=>'S', ''=>'s', ''=>'Dj', ''=>'dj', ''=>'Z', ''=>'z', ''=>'C', ''=>'c', ''=>'C', ''=>'c', ''=>'A', ''=>'A', ''=>'A', ''=>'A', ''=>'A', ''=>'A', ''=>'A', ''=>'C', ''=>'E', ''=>'E', ''=>'E', ''=>'E', ''=>'I', ''=>'I', ''=>'I', ''=>'I', ''=>'N', ''=>'O', ''=>'O', ''=>'O', ''=>'O', ''=>'O', ''=>'O', ''=>'U', ''=>'U', ''=>'U', ''=>'U', ''=>'Y', ''=>'B', ''=>'Ss', ''=>'a', ''=>'a', ''=>'a', ''=>'a', ''=>'a', ''=>'a', ''=>'a', ''=>'c', ''=>'e', ''=>'e', ''=>'e', ''=>'e', ''=>'i', ''=>'i', ''=>'i', ''=>'i', ''=>'o', ''=>'n', ''=>'o', ''=>'o', ''=>'o', ''=>'o', ''=>'o', ''=>'o', ''=>'u', ''=>'u', ''=>'u', ''=>'y', ''=>'y', ''=>'b', ''=>'y', ''=>'R', ''=>'r', "`" => "'", "" => "'", "" => ",", "`" => "'", "" => "'", "" => "\"", "" => "\"", "" => "'", "&acirc;" => "'", "{" => "", "~" => "", "" => "-", "" => "'"); $str = str_replace(array_keys($invalid), array_values($invalid), $str); return $str; } echo nomrmalize_str($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4IdPh
function name:  (null)
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'COL%E2%94%9C%C3%A2%3FN+1391'
   23     1        INIT_FCALL_BY_NAME                                       'nomrmalize_str'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
          5      > RETURN                                                   1

Function normalize_str:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4IdPh
function name:  normalize_str
number of ops:  16
compiled vars:  !0 = $str, !1 = $invalid
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1        ASSIGN                                                   !1, <array>
   19     2        INIT_FCALL                                               'str_replace'
          3        INIT_FCALL                                               'array_keys'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $3      
          6        SEND_VAR                                                 $3
          7        INIT_FCALL                                               'array_values'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $4      
         10        SEND_VAR                                                 $4
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $5      
         13        ASSIGN                                                   !0, $5
   21    14      > RETURN                                                   !0
   22    15*     > RETURN                                                   null

End of function normalize_str

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.48 ms | 1387 KiB | 19 Q