3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { } class Bar { } function F(Foo ...$foos) { var_dump($foos); } $arr = [new Foo(), new Foo(), new Bar()]; F(...$arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/usf2l
function name:  (null)
number of ops:  15
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        INIT_ARRAY                                       ~3      $1
          3        NEW                                              $4      'Foo'
          4        DO_FCALL                                      0          
          5        ADD_ARRAY_ELEMENT                                ~3      $4
          6        NEW                                              $6      'Bar'
          7        DO_FCALL                                      0          
          8        ADD_ARRAY_ELEMENT                                ~3      $6
          9        ASSIGN                                                   !0, ~3
   10    10        INIT_FCALL                                               'f'
         11        SEND_UNPACK                                              !0
         12        CHECK_UNDEF_ARGS                                         
         13        DO_FCALL                                      1          
         14      > RETURN                                                   1

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

End of function f

Class Foo: [no user functions]
Class Bar: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.77 ms | 1397 KiB | 16 Q