3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(array &$x = array()){} $x = array(); foo($x[]); foo($x[]); foo($x[]); foo($x[]); var_dump($x);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ik1HB
function name:  (null)
number of ops:  21
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    6     1        INIT_FCALL                                               'foo'
          2        FETCH_DIM_W                                      $2      !0
          3        SEND_REF                                                 $2
          4        DO_FCALL                                      0          
    7     5        INIT_FCALL                                               'foo'
          6        FETCH_DIM_W                                      $4      !0
          7        SEND_REF                                                 $4
          8        DO_FCALL                                      0          
    8     9        INIT_FCALL                                               'foo'
         10        FETCH_DIM_W                                      $6      !0
         11        SEND_REF                                                 $6
         12        DO_FCALL                                      0          
    9    13        INIT_FCALL                                               'foo'
         14        FETCH_DIM_W                                      $8      !0
         15        SEND_REF                                                 $8
         16        DO_FCALL                                      0          
   11    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ik1HB
function name:  foo
number of ops:  2
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV_INIT                                        !0      <array>
          1      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.57 ms | 1398 KiB | 19 Q