3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = ["1" => "a", "2" => "b", "3" => [10 => "apple",11 => "cat", 12 => ["key" => "image" ]]]; if ( array_walk_recursive($arr, function($item,$key) { if ($key == "key") { echo "\nKey is $key and item is $item"; } })) { echo "\narray_walk_recursive rocks :)"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/MSYEt
function name:  (null)
number of ops:  9
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    6     1        INIT_FCALL                                               'array_walk_recursive'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
   13     4        SEND_VAL                                                 ~2
    6     5        DO_ICALL                                         $3      
   13     6      > JMPZ                                                     $3, ->8
          7    >   ECHO                                                     '%0Aarray_walk_recursive+rocks+%3A%29'
          8    > > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/MSYEt
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $item, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    8     2        IS_EQUAL                                                 !1, 'key'
          3      > JMPZ                                                     ~2, ->9
    9     4    >   ROPE_INIT                                     4  ~4      '%0AKey+is+'
          5        ROPE_ADD                                      1  ~4      ~4, !1
          6        ROPE_ADD                                      2  ~4      ~4, '+and+item+is+'
          7        ROPE_END                                      3  ~3      ~4, !0
          8        ECHO                                                     ~3
   13     9    > > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.21 ms | 1010 KiB | 14 Q