3v4l.org

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

Function %00%7Bclosure%7D%2Fin%2FCdQaB%3A11%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CdQaB
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $value, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   12     2        INIT_ARRAY                                       ~3      !0, 'id'
          3        ASSIGN_DIM                                               !1
          4        OP_DATA                                                  ~3
   13     5      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FCdQaB%3A11%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.01 ms | 940 KiB | 18 Q