3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 1 => [ 1 => [ 'anna', 'alice' ], 2 => [ 'bob', 'bartold' ] ], 2 => [ 1 => [ 'carol' ], 2 => [ 'david' ] ] ]; $result = []; array_walk_recursive($array, function ($value, $key) use (&$result) { if (!is_array($value)) { echo "{$key} <br /> -- {$value} <br />"; } }); var_dump($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fVDFX
function name:  (null)
number of ops:  12
compiled vars:  !0 = $array, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   24     1        ASSIGN                                                   !1, <array>
   26     2        INIT_FCALL                                               'array_walk_recursive'
          3        SEND_REF                                                 !0
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FfVDFX%3A26%240'
          5        BIND_LEXICAL                                             ~4, !1
   30     6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
   32     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FfVDFX%3A26%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/fVDFX
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $value, !1 = $key, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
   27     3        TYPE_CHECK                                  128  ~3      !0
          4        BOOL_NOT                                         ~4      ~3
          5      > JMPZ                                                     ~4, ->11
   28     6    >   ROPE_INIT                                     4  ~6      !1
          7        ROPE_ADD                                      1  ~6      ~6, '+%3Cbr+%2F%3E+--+'
          8        ROPE_ADD                                      2  ~6      ~6, !0
          9        ROPE_END                                      3  ~5      ~6, '+%3Cbr+%2F%3E'
         10        ECHO                                                     ~5
   30    11    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FfVDFX%3A26%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.62 ms | 1395 KiB | 17 Q