3v4l.org

run code in 300+ PHP versions simultaneously
<?php class XXX{ const AR = [1,2,3]; } function test(...$args) { var_dump($args); } test(... (1)); // [1, 2, 3] // [1, 2, 3] test(...XXX::AR); // [1, 2, 3] test(...new ArrayIterator([1, 2, 3])); // [1, 2, 3]
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cQRYR
function name:  (null)
number of ops:  16
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'test'
          1        SEND_UNPACK                                              1
          2        CHECK_UNDEF_ARGS                                         
          3        DO_FCALL                                      1          
   11     4        INIT_FCALL                                               'test'
          5        SEND_UNPACK                                              <array>
          6        CHECK_UNDEF_ARGS                                         
          7        DO_FCALL                                      1          
   12     8        INIT_FCALL                                               'test'
          9        NEW                                              $2      'ArrayIterator'
         10        SEND_VAL_EX                                              <array>
         11        DO_FCALL                                      0          
         12        SEND_UNPACK                                              $2
         13        CHECK_UNDEF_ARGS                                         
         14        DO_FCALL                                      1          
         15      > RETURN                                                   1

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

End of function test

Class XXX: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.35 ms | 1397 KiB | 18 Q