3v4l.org

run code in 300+ PHP versions simultaneously
<?php $testArray = array(1, 'test' => array('a' => array('percy', 'mitch'),'b','c')); $helper = array(); array_walk_recursive( $testArray, function ($item, $key) use (&$helper) { if ($key === 'a') { //$helper[] = $item; var_dump($item); } } ); //var_dump($helper);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WhbZd
function name:  (null)
number of ops:  9
compiled vars:  !0 = $testArray, !1 = $helper
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    6     1        ASSIGN                                                   !1, <array>
    8     2        INIT_FCALL                                               'array_walk_recursive'
    9     3        SEND_REF                                                 !0
   10     4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FWhbZd%3A10%240'
          5        BIND_LEXICAL                                             ~4, !1
   17     6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
   21     8      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FWhbZd%3A10%240:
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
filename:       /in/WhbZd
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $item, !1 = $key, !2 = $helper
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
   13     3        IS_IDENTICAL                                             !1, 'a'
          4      > JMPZ                                                     ~3, ->8
   15     5    >   INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
   17     8    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FWhbZd%3A10%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.01 ms | 1395 KiB | 17 Q