3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = 'a' . chr(0) . 'bc'; $string = str_replace(chr(0), '\\'.'0', $string); preg_match('/^' . $string . '$/', ($string = str_replace('\\'.'0', chr(0), $string)), $v); $v = rarray($v); $d = array(); var_dump(human_redable($v), human_redable($string), preg_last_error()); function rarray(&$a) { $b = is_array($a); if($b === true) { $b = null; unset($b); return $a; } $c = array(); $a = $b = null; unset($a, $b); return $c; } //numeric array function human_redable(&$a) { $b = is_scalar($a); if($b === true) { $a = urlencode($a); $b = null; unset($b); return $a; } elseif(($b = is_array($a)) === true) { $d = array(); foreach($a as $k => &$v) { $d[$k] = urlencode($v); } $a = $b = $k = $v = null; unset($a, $b, $k, $v); return $d; } return false; } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LluRm
function name:  (null)
number of ops:  33
compiled vars:  !0 = $string, !1 = $v, !2 = $d
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, 'a%00bc'
    3     1        FRAMELESS_ICALL_3                str_replace         ~4      '%00', '%5C0'
          2        OP_DATA                                                      !0
          3        ASSIGN                                                       !0, ~4
    4     4        INIT_FCALL                                                   'preg_match'
          5        CONCAT                                               ~6      '%2F%5E', !0
          6        CONCAT                                               ~7      ~6, '%24%2F'
          7        SEND_VAL                                                     ~7
          8        FRAMELESS_ICALL_3                str_replace         ~8      '%5C0', '%00'
          9        OP_DATA                                                      !0
         10        ASSIGN                                               ~9      !0, ~8
         11        SEND_VAL                                                     ~9
         12        SEND_REF                                                     !1
         13        DO_ICALL                                                     
    5    14        INIT_FCALL_BY_NAME                                           'rarray'
         15        SEND_VAR_EX                                                  !1
         16        DO_FCALL                                          0  $11     
         17        ASSIGN                                                       !1, $11
    6    18        ASSIGN                                                       !2, <array>
    7    19        INIT_FCALL                                                   'var_dump'
         20        INIT_FCALL_BY_NAME                                           'human_redable'
         21        SEND_VAR_EX                                                  !1
         22        DO_FCALL                                          0  $14     
         23        SEND_VAR                                                     $14
         24        INIT_FCALL_BY_NAME                                           'human_redable'
         25        SEND_VAR_EX                                                  !0
         26        DO_FCALL                                          0  $15     
         27        SEND_VAR                                                     $15
         28        INIT_FCALL                                                   'preg_last_error'
         29        DO_ICALL                                             $16     
         30        SEND_VAR                                                     $16
         31        DO_ICALL                                                     
   42    32      > RETURN                                                       1

Function rarray:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LluRm
function name:  rarray
number of ops:  15
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   RECV                                                 !0      
   10     1        TYPE_CHECK                                      128  ~3      !0
          2        ASSIGN                                                       !1, ~3
   11     3        TYPE_CHECK                                        8          !1
          4      > JMPZ                                                         ~5, ->8
   12     5    >   ASSIGN                                                       !1, null
   13     6        UNSET_CV                                                     !1
   14     7      > RETURN                                                       !0
   16     8    >   ASSIGN                                                       !2, <array>
   17     9        ASSIGN                                               ~8      !1, null
         10        ASSIGN                                                       !0, ~8
   18    11        UNSET_CV                                                     !0
         12        UNSET_CV                                                     !1
   19    13      > RETURN                                                       !2
   20    14*     > RETURN                                                       null

End of function rarray

Function human_redable:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 13
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 37
Branch analysis from position: 17
2 jumps found. (Code = 125) Position 1 = 19, Position 2 = 27
Branch analysis from position: 19
2 jumps found. (Code = 126) Position 1 = 20, Position 2 = 27
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LluRm
function name:  human_redable
number of ops:  39
compiled vars:  !0 = $a, !1 = $b, !2 = $d, !3 = $v, !4 = $k
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   23     0  E >   RECV                                                 !0      
   24     1        TYPE_CHECK                                      124  ~5      !0
          2        ASSIGN                                                       !1, ~5
   25     3        TYPE_CHECK                                        8          !1
          4      > JMPZ                                                         ~7, ->13
   26     5    >   INIT_FCALL                                                   'urlencode'
          6        SEND_VAR                                                     !0
          7        DO_ICALL                                             $8      
          8        ASSIGN                                                       !0, $8
   27     9        ASSIGN                                                       !1, null
   28    10        UNSET_CV                                                     !1
   29    11      > RETURN                                                       !0
   25    12*       JMP                                                          ->37
   30    13    >   TYPE_CHECK                                      128  ~11     !0
         14        ASSIGN                                               ~12     !1, ~11
         15        TYPE_CHECK                                        8          ~12
         16      > JMPZ                                                         ~13, ->37
   31    17    >   ASSIGN                                                       !2, <array>
   32    18      > FE_RESET_RW                                          $15     !0, ->27
         19    > > FE_FETCH_RW                                          ~16     $15, !3, ->27
         20    >   ASSIGN                                                       !4, ~16
   33    21        INIT_FCALL                                                   'urlencode'
         22        SEND_VAR                                                     !3
         23        DO_ICALL                                             $19     
         24        ASSIGN_DIM                                                   !2, !4
         25        OP_DATA                                                      $19
   32    26      > JMP                                                          ->19
         27    >   FE_FREE                                                      $15
   35    28        ASSIGN                                               ~20     !3, null
         29        ASSIGN                                               ~21     !4, ~20
         30        ASSIGN                                               ~22     !1, ~21
         31        ASSIGN                                                       !0, ~22
   36    32        UNSET_CV                                                     !0
         33        UNSET_CV                                                     !1
         34        UNSET_CV                                                     !4
         35        UNSET_CV                                                     !3
   37    36      > RETURN                                                       !2
   39    37    > > RETURN                                                       <false>
   40    38*     > RETURN                                                       null

End of function human_redable

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.97 ms | 3330 KiB | 17 Q