3v4l.org

run code in 300+ PHP versions simultaneously
<?php function show($arr, $prefix = '') { if (!is_array($arr)) { if ($prefix) { echo $prefix . '->'. $arr, "\n"; } else { echo $arr, "\n"; } } else { foreach ($arr as $key => $val) { $pre = $prefix; if (is_array($val)) { if ($pre) { $pre = $pre . '->' . $key; } else { $pre = $key; } show($val, $pre); } else { show($val, $pre); } } } } $list = array( 'transport' => array( 'plane' => array( 'boeing', 'airbus', ), 'car' => array( 'audi', 'ford' ), ), ); show($list);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YV83b
function name:  (null)
number of ops:  5
compiled vars:  !0 = $list
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   42     0  E >   ASSIGN                                                   !0, <array>
   55     1        INIT_FCALL                                               'show'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function show:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 14
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
Branch analysis from position: 14
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 36
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 36
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 31
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 25
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
filename:       /in/YV83b
function name:  show
number of ops:  38
compiled vars:  !0 = $arr, !1 = $prefix, !2 = $val, !3 = $key, !4 = $pre
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      ''
    5     2        TYPE_CHECK                                  128  ~5      !0
          3        BOOL_NOT                                         ~6      ~5
          4      > JMPZ                                                     ~6, ->14
    7     5    > > JMPZ                                                     !1, ->11
    9     6    >   CONCAT                                           ~7      !1, '-%3E'
          7        CONCAT                                           ~8      ~7, !0
          8        ECHO                                                     ~8
          9        ECHO                                                     '%0A'
         10      > JMP                                                      ->13
   13    11    >   ECHO                                                     !0
         12        ECHO                                                     '%0A'
         13    > > JMP                                                      ->37
   18    14    > > FE_RESET_R                                       $9      !0, ->36
         15    > > FE_FETCH_R                                       ~10     $9, !2, ->36
         16    >   ASSIGN                                                   !3, ~10
   20    17        ASSIGN                                                   !4, !1
   22    18        TYPE_CHECK                                  128          !2
         19      > JMPZ                                                     ~13, ->31
   24    20    > > JMPZ                                                     !4, ->25
   26    21    >   CONCAT                                           ~14     !4, '-%3E'
         22        CONCAT                                           ~15     ~14, !3
         23        ASSIGN                                                   !4, ~15
         24      > JMP                                                      ->26
   30    25    >   ASSIGN                                                   !4, !3
   32    26    >   INIT_FCALL_BY_NAME                                       'show'
         27        SEND_VAR_EX                                              !2
         28        SEND_VAR_EX                                              !4
         29        DO_FCALL                                      0          
         30      > JMP                                                      ->35
   36    31    >   INIT_FCALL_BY_NAME                                       'show'
         32        SEND_VAR_EX                                              !2
         33        SEND_VAR_EX                                              !4
         34        DO_FCALL                                      0          
   18    35    > > JMP                                                      ->15
         36    >   FE_FREE                                                  $9
   40    37    > > RETURN                                                   null

End of function show

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.01 ms | 1403 KiB | 14 Q