3v4l.org

run code in 300+ PHP versions simultaneously
<?php class XXX{ const AR = [1,2,3]; } function test(...$args) { var_dump($args); } $tmp = [1,2,3]; test(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/essOU
function name:  (null)
number of ops:  18
compiled vars:  !0 = $tmp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, <array>
   11     1        INIT_FCALL                                               'test'
          2        SEND_VAL                                                 1
          3        SEND_VAL                                                 2
          4        SEND_VAL                                                 3
          5        DO_FCALL                                      0          
   12     6        INIT_FCALL                                               'test'
          7        SEND_UNPACK                                              <array>
          8        CHECK_UNDEF_ARGS                                         
          9        DO_FCALL                                      1          
   13    10        INIT_FCALL                                               'test'
         11        NEW                                              $4      'ArrayIterator'
         12        SEND_VAL_EX                                              <array>
         13        DO_FCALL                                      0          
         14        SEND_UNPACK                                              $4
         15        CHECK_UNDEF_ARGS                                         
         16        DO_FCALL                                      1          
         17      > RETURN                                                   1

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