3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = ''; foreach(str_split(iconv("UTF-8", "Windows-1252", "my utf8 string áéíóú")) as $n => $c) { if (! ctype_graph($c)) { $c = '%'.bin2hex($c); } $string .= $c; } var_dump($string);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 24
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 24
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 22
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 22
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/jCt8a
function name:  (null)
number of ops:  29
compiled vars:  !0 = $string, !1 = $c, !2 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, ''
    4     1        INIT_FCALL                                               'str_split'
          2        INIT_FCALL_BY_NAME                                       'iconv'
          3        SEND_VAL_EX                                              'UTF-8'
          4        SEND_VAL_EX                                              'Windows-1252'
          5        SEND_VAL_EX                                              'my+utf8+string+%C3%A1%C3%A9%C3%AD%C3%B3%C3%BA'
          6        DO_FCALL                                      0  $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                         $5      
          9      > FE_RESET_R                                       $6      $5, ->24
         10    > > FE_FETCH_R                                       ~7      $6, !1, ->24
         11    >   ASSIGN                                                   !2, ~7
    5    12        INIT_FCALL                                               'ctype_graph'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $9      
         15        BOOL_NOT                                         ~10     $9
         16      > JMPZ                                                     ~10, ->22
    6    17    >   INIT_FCALL                                               'bin2hex'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                         $11     
         20        CONCAT                                           ~12     '%25', $11
         21        ASSIGN                                                   !1, ~12
    8    22    >   ASSIGN_OP                                     8          !0, !1
    4    23      > JMP                                                      ->10
         24    >   FE_FREE                                                  $6
   11    25        INIT_FCALL                                               'var_dump'
         26        SEND_VAR                                                 !0
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.5 ms | 1396 KiB | 21 Q