3v4l.org

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

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

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.86 ms | 1438 KiB | 15 Q