3v4l.org

run code in 300+ PHP versions simultaneously
<?php function lol($a, $b, $c){ $args = array_splice(func_get_args(), 0); var_dump(...$args); } function baz($a, $b, $c){ $args = [1,2,3]; lol(...$args); } baz();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iI06v
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'baz'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Function lol:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iI06v
function name:  lol
number of ops:  14
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    4     3        INIT_FCALL                                               'array_splice'
          4        FUNC_GET_ARGS                                    ~4      
          5        SEND_VAL_EX                                              ~4
          6        SEND_VAL                                                 0
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !3, $5
    5     9        INIT_FCALL                                               'var_dump'
         10        SEND_UNPACK                                              !3
         11        CHECK_UNDEF_ARGS                                         
         12        DO_ICALL                                                 
    6    13      > RETURN                                                   null

End of function lol

Function baz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iI06v
function name:  baz
number of ops:  9
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    9     3        ASSIGN                                                   !3, <array>
   10     4        INIT_FCALL                                               'lol'
          5        SEND_UNPACK                                              !3
          6        CHECK_UNDEF_ARGS                                         
          7        DO_FCALL                                      1          
   11     8      > RETURN                                                   null

End of function baz

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.8 ms | 1399 KiB | 19 Q