3v4l.org

run code in 300+ PHP versions simultaneously
<?php $args = [1]; $ref = [&$args]; function test(&$v) { $v = 7; }; test(...$ref[0]); var_dump($args[0]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/erN2Q
function name:  (null)
number of ops:  13
compiled vars:  !0 = $args, !1 = $ref
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_ARRAY                                       ~3      !0
          2        ASSIGN                                                   !1, ~3
    8     3        INIT_FCALL                                               'test'
          4        FETCH_DIM_R                                      ~5      !1, 0
          5        SEND_UNPACK                                              ~5
          6        CHECK_UNDEF_ARGS                                         
          7        DO_FCALL                                      1          
    9     8        INIT_FCALL                                               'var_dump'
          9        FETCH_DIM_R                                      ~7      !0, 0
         10        SEND_VAL                                                 ~7
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

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

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.93 ms | 1442 KiB | 16 Q