3v4l.org

run code in 500+ PHP versions simultaneously
<?php function foo($x, ...$array) { print_r($x); print_r($array); } $a = ['w' => 'w', 'x' => 'x']; foo(...$a); print_r(array_merge(...$a)); // array_merge() does not accept unknown named parameters
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/miPmk
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                       !0, <array>
   10     1        INIT_FCALL                                                   'foo'
          2        SEND_UNPACK                                                  !0
          3        CHECK_UNDEF_ARGS                                             
          4        DO_FCALL                                          1          
   12     5        INIT_FCALL                                                   'print_r'
          6        INIT_FCALL                                                   'array_merge'
          7        SEND_UNPACK                                                  !0
          8        CHECK_UNDEF_ARGS                                             
          9        DO_ICALL                                             $3      
         10        SEND_VAR                                                     $3
         11        DO_ICALL                                                     
   13    12      > RETURN                                                       1

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

End of function foo

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.42 ms | 1257 KiB | 16 Q