3v4l.org

run code in 500+ PHP versions simultaneously
<?php function foo() { print_r(func_get_args()); } $array = [1,2,3]; // Not possible // cannot use positional argument after unpacking //foo(...$array, ...$array, 4); foo(...$array, ...$array, ...[4]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n1pq9
function name:  (null)
number of ops:  8
compiled vars:  !0 = $array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                       !0, <array>
   13     1        INIT_FCALL                                                   'foo'
          2        SEND_UNPACK                                                  !0
          3        SEND_UNPACK                                                  !0
          4        SEND_UNPACK                                                  <array>
          5        CHECK_UNDEF_ARGS                                             
          6        DO_FCALL                                          1          
          7      > RETURN                                                       1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n1pq9
function name:  foo
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                                   'print_r'
          1        FUNC_GET_ARGS                                        ~0      
          2        SEND_VAL                                                     ~0
          3        DO_ICALL                                                     
    5     4      > RETURN                                                       null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.94 ms | 1356 KiB | 15 Q