3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [ 'name' => 'a', 'url' => 'b', ], [ 'name' => 'c', 'url' => 'd', 'children' => [ [ 'name' => 'e', 'url' => 'f' ] ] ] ]; function recurseAll($node) { echo "\n---\n"; if (is_iterable($node)) { var_export($node); foreach ($node as $childNode) { recurseAll($childNode); } } else { echo $node; } } array_walk($array, 'recurseAll');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P1EHQ
function name:  (null)
number of ops:  6
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   32     1        INIT_FCALL                                               'array_walk'
          2        SEND_REF                                                 !0
          3        SEND_VAL                                                 'recurseAll'
          4        DO_ICALL                                                 
          5      > RETURN                                                   1

Function recurseall:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 17
Branch analysis from position: 6
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P1EHQ
function name:  recurseAll
number of ops:  19
compiled vars:  !0 = $node, !1 = $childNode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
   21     1        ECHO                                                     '%0A---%0A'
   22     2        INIT_FCALL                                               'is_iterable'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5      > JMPZ                                                     $2, ->17
   23     6    >   INIT_FCALL                                               'var_export'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   24     9      > FE_RESET_R                                       $4      !0, ->15
         10    > > FE_FETCH_R                                               $4, !1, ->15
   25    11    >   INIT_FCALL_BY_NAME                                       'recurseAll'
         12        SEND_VAR_EX                                              !1
         13        DO_FCALL                                      0          
   24    14      > JMP                                                      ->10
         15    >   FE_FREE                                                  $4
   22    16      > JMP                                                      ->18
   28    17    >   ECHO                                                     !0
   30    18    > > RETURN                                                   null

End of function recurseall

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.19 ms | 1013 KiB | 16 Q