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,2,3]), ... $xxx); // [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/RSaZa
function name:  (null)
number of ops:  17
compiled vars:  !0 = $xxx
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'test'
          1        SEND_UNPACK                                              <array>
          2        SEND_UNPACK                                              !0
          3        CHECK_UNDEF_ARGS                                         
          4        DO_FCALL                                      1          
   11     5        INIT_FCALL                                               'test'
          6        SEND_UNPACK                                              <array>
          7        CHECK_UNDEF_ARGS                                         
          8        DO_FCALL                                      1          
   12     9        INIT_FCALL                                               'test'
         10        NEW                                              $3      'ArrayIterator'
         11        SEND_VAL_EX                                              <array>
         12        DO_FCALL                                      0          
         13        SEND_UNPACK                                              $3
         14        CHECK_UNDEF_ARGS                                         
         15        DO_FCALL                                      1          
         16      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RSaZa
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:
181.17 ms | 1398 KiB | 18 Q