3v4l.org

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

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

End of function foo

Class Bar: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.76 ms | 1397 KiB | 16 Q