3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f($ar = array(), &$gl = array()) { $gl[0] = array($ar[1]); } $globals = array(); $array_example = array('foo', 'bar'); f($array_example, $globals); print_r($globals);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s8FUh
function name:  (null)
number of ops:  10
compiled vars:  !0 = $globals, !1 = $array_example
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, <array>
   10     2        INIT_FCALL                                               'f'
          3        SEND_VAR                                                 !1
          4        SEND_REF                                                 !0
          5        DO_FCALL                                      0          
   11     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s8FUh
function name:  f
number of ops:  7
compiled vars:  !0 = $ar, !1 = $gl
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      <array>
          1        RECV_INIT                                        !1      <array>
    5     2        FETCH_DIM_R                                      ~3      !0, 1
          3        INIT_ARRAY                                       ~4      ~3
          4        ASSIGN_DIM                                               !1, 0
          5        OP_DATA                                                  ~4
    6     6      > RETURN                                                   null

End of function f

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
197.17 ms | 1397 KiB | 16 Q