3v4l.org

run code in 300+ PHP versions simultaneously
<?php $nu_array = null; $callback = function ( $item ) use(&$nu_array) { $nu_array[] = $item; }; $array = array('apple', array(1,2), 'butter',array(3,4,array(5,array(6,7)))); array_walk_recursive($array, $callback); print_r($nu_array); /** Array ( ) **/
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Sp1S6
function name:  (null)
number of ops:  13
compiled vars:  !0 = $nu_array, !1 = $callback, !2 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, null
    3     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FSp1S6%3A3%240'
          2        BIND_LEXICAL                                             ~4, !0
          3        ASSIGN                                                   !1, ~4
    6     4        ASSIGN                                                   !2, <array>
   10     5        INIT_FCALL                                               'array_walk_recursive'
          6        SEND_REF                                                 !2
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
   12     9        INIT_FCALL                                               'print_r'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
   17    12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FSp1S6%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Sp1S6
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $item, !1 = $nu_array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
    4     2        ASSIGN_DIM                                               !1
          3        OP_DATA                                                  !0
    5     4      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FSp1S6%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.48 ms | 1395 KiB | 17 Q