3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bar{} function foo(Bar ...$bars) { echo "Got " . count($bars) . " bars.\n"; } $bars = [new Bar, new Bar, new Bar]; foo(...$bars);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MEBVR
function name:  (null)
number of ops:  15
compiled vars:  !0 = $bars
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $1      'Bar'
          1        DO_FCALL                                      0          
          2        INIT_ARRAY                                       ~3      $1
          3        NEW                                              $4      'Bar'
          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
   12    10        INIT_FCALL                                               'foo'
         11        SEND_UNPACK                                              !0
         12        CHECK_UNDEF_ARGS                                         
         13        DO_FCALL                                      1          
         14      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MEBVR
function name:  foo
number of ops:  6
compiled vars:  !0 = $bars
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV_VARIADIC                                    !0      
    7     1        COUNT                                            ~1      !0
          2        CONCAT                                           ~2      'Got+', ~1
          3        CONCAT                                           ~3      ~2, '+bars.%0A'
          4        ECHO                                                     ~3
    8     5      > RETURN                                                   null

End of function foo

Class Bar: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.55 ms | 1397 KiB | 14 Q