3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test_variadic(...$args) // Note that `$args` is not optional here. { print_r($args); } test(); // Test without any arguments. Woah. This works. Nice!
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/02QE3
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL_BY_NAME                                       'test'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

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

End of function test_variadic

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.42 ms | 1398 KiB | 15 Q