3v4l.org

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

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/39PiM
function name:  test
number of ops:  8
compiled vars:  !0 = $args
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV_VARIADIC                                        !0      
    4     1        INIT_FCALL                                                   'print_r'
          2        SEND_VAR                                                     !0
          3        DO_ICALL                                                     
    5     4        ASSIGN_DIM                                                   !0, 0
          5        OP_DATA                                                      100
    6     6        ASSIGN                                                       !0, <array>
    7     7      > RETURN                                                       null

End of function test

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
127.07 ms | 479 KiB | 9 Q