3v4l.org

run code in 300+ 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:  39
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        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 '%00'
          3        SEND_VAL                                                 '%5C0'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !0, $4
    4     7        INIT_FCALL                                               'preg_match'
          8        CONCAT                                           ~6      '%2F%5E', !0
          9        CONCAT                                           ~7      ~6, '%24%2F'
         10        SEND_VAL                                                 ~7
         11        INIT_FCALL                                               'str_replace'
         12        SEND_VAL                                                 '%5C0'
         13        SEND_VAL                                                 '%00'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $8      
         16        ASSIGN                                           ~9      !0, $8
         17        SEND_VAL                                                 ~9
         18        SEND_REF                                                 !1
         19        DO_ICALL                                                 
    5    20        INIT_FCALL_BY_NAME                                       'rarray'
         21        SEND_VAR_EX                                              !1
         22        DO_FCALL                                      0  $11     
         23        ASSIGN                                                   !1, $11
    6    24        ASSIGN                                                   !2, <array>
    7    25        INIT_FCALL                                               'var_dump'
         26        INIT_FCALL_BY_NAME                                       'human_redable'
         27        SEND_VAR_EX                                              !1
         28        DO_FCALL                                      0  $14     
         29        SEND_VAR                                                 $14
         30        INIT_FCALL_BY_NAME                                       'human_redable'
         31        SEND_VAR_EX                                              !0
         32        DO_FCALL                                      0  $15     
         33        SEND_VAR                                                 $15
         34        INIT_FCALL                                               'preg_last_error'
         35        DO_ICALL                                         $16     
         36        SEND_VAR                                                 $16
         37        DO_ICALL                                                 
   42    38      > 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
         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.0.0


preferences:
183.19 ms | 1404 KiB | 23 Q