3v4l.org

run code in 300+ PHP versions simultaneously
<?php function r($node) { if (!is_array($node['val'])) { echo $node['val']; } else { foreach($node['val'] as $n) { r($n); } } } $a = array('val'=>array(array('val'=>2), array('val'=>1))); r($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qgJcG
function name:  (null)
number of ops:  5
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ASSIGN                                                   !0, <array>
   16     1        INIT_FCALL                                               'r'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function r:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
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 = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/qgJcG
function name:  r
number of ops:  17
compiled vars:  !0 = $node, !1 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        FETCH_DIM_R                                      ~2      !0, 'val'
          2        TYPE_CHECK                                  128  ~3      ~2
          3        BOOL_NOT                                         ~4      ~3
          4      > JMPZ                                                     ~4, ->8
    6     5    >   FETCH_DIM_R                                      ~5      !0, 'val'
          6        ECHO                                                     ~5
          7      > JMP                                                      ->16
    8     8    >   FETCH_DIM_R                                      ~6      !0, 'val'
          9      > FE_RESET_R                                       $7      ~6, ->15
         10    > > FE_FETCH_R                                               $7, !1, ->15
    9    11    >   INIT_FCALL_BY_NAME                                       'r'
         12        SEND_VAR_EX                                              !1
         13        DO_FCALL                                      0          
    8    14      > JMP                                                      ->10
         15    >   FE_FREE                                                  $7
   12    16    > > RETURN                                                   null

End of function r

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.2 ms | 1399 KiB | 14 Q