3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($x) { $x[0] = 42; } $c = array(1); $d = array(&$c[0]); foo($c); echo $d[0], "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qtOQB
function name:  (null)
number of ops:  11
compiled vars:  !0 = $c, !1 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, <array>
    8     1        FETCH_DIM_W                                      $3      !0, 0
          2        INIT_ARRAY                                       ~4      $3
          3        ASSIGN                                                   !1, ~4
   10     4        INIT_FCALL                                               'foo'
          5        SEND_VAR                                                 !0
          6        DO_FCALL                                      0          
   12     7        FETCH_DIM_R                                      ~7      !1, 0
          8        ECHO                                                     ~7
          9        ECHO                                                     '%0A'
         10      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qtOQB
function name:  foo
number of ops:  4
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN_DIM                                               !0, 0
          2        OP_DATA                                                  42
    5     3      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.45 ms | 1396 KiB | 14 Q