3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(1, 2, 3, 4, 5 ); $step = 2; function myfunc($key, $value) { if ($key == $step) echo ' $ '; echo "$value "; } array_walk($a, 'myfunc');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6LXGY
function name:  (null)
number of ops:  7
compiled vars:  !0 = $a, !1 = $step
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 2
   10     2        INIT_FCALL                                               'array_walk'
          3        SEND_REF                                                 !0
          4        SEND_VAL                                                 'myfunc'
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function myfunc:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/6LXGY
function name:  myfunc
number of ops:  9
compiled vars:  !0 = $key, !1 = $value, !2 = $step
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2        IS_EQUAL                                                 !0, !2
          3      > JMPZ                                                     ~3, ->5
          4    >   ECHO                                                     '+%24+'
    8     5    >   NOP                                                      
          6        FAST_CONCAT                                      ~4      !1, '+'
          7        ECHO                                                     ~4
    9     8      > RETURN                                                   null

End of function myfunc

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.11 ms | 940 KiB | 16 Q