3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array ('backtrace', 'print'); array_walk($array, 'walk_callback', str_repeat("\0",1024)); function walk_callback($value, $key, $userdata) { if ($value == 'print') { print($userdata); exit("\n\n"); } elseif ($value == 'backtrace') { debug_backtrace(); if ($userdata !== str_repeat("\0",1024)) { die("won't get here, \$userdata is still clean until we return"); } } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eZIbl
function name:  (null)
number of ops:  11
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'array_walk'
          2        SEND_REF                                                 !0
          3        SEND_VAL                                                 'walk_callback'
          4        INIT_FCALL                                               'str_repeat'
          5        SEND_VAL                                                 '%00'
          6        SEND_VAL                                                 1024
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                                 
   21    10      > RETURN                                                   1

Function walk_callback:
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 = 79) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 19
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 19
Branch analysis from position: 18
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/eZIbl
function name:  walk_callback
number of ops:  20
compiled vars:  !0 = $value, !1 = $key, !2 = $userdata
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    8     3        IS_EQUAL                                                 !0, 'print'
          4      > JMPZ                                                     ~3, ->8
   10     5    >   ECHO                                                     !2
   11     6      > EXIT                                                     '%0A%0A'
          7*       JMP                                                      ->19
   13     8    >   IS_EQUAL                                                 !0, 'backtrace'
          9      > JMPZ                                                     ~4, ->19
   15    10    >   INIT_FCALL                                               'debug_backtrace'
         11        DO_ICALL                                                 
   16    12        INIT_FCALL                                               'str_repeat'
         13        SEND_VAL                                                 '%00'
         14        SEND_VAL                                                 1024
         15        DO_ICALL                                         $6      
         16        IS_NOT_IDENTICAL                                         !2, $6
         17      > JMPZ                                                     ~7, ->19
   18    18    > > EXIT                                                     'won%27t+get+here%2C+%24userdata+is+still+clean+until+we+return'
   21    19    > > RETURN                                                   null

End of function walk_callback

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.67 ms | 1396 KiB | 19 Q