3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function test(Baz $bar1 = null) { var_dump(func_get_args()); } } class Baz extends Foo { public function test(...$args) { parent::test(...$args); } } $baz = new Baz(); $baz->test($baz); $foo = new Foo(); $foo->test($baz);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/e9udJ
function name:  (null)
number of ops:  13
compiled vars:  !0 = $baz, !1 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $2      'Baz'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   16     3        INIT_METHOD_CALL                                         !0, 'test'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
   17     6        NEW                                              $6      'Foo'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $6
   18     9        INIT_METHOD_CALL                                         !1, 'test'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

Class Foo:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/e9udJ
function name:  test
number of ops:  6
compiled vars:  !0 = $bar1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV_INIT                                        !0      null
    5     1        INIT_FCALL                                               'var_dump'
          2        FUNC_GET_ARGS                                    ~1      
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                                 
    6     5      > RETURN                                                   null

End of function test

End of class Foo.

Class Baz:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/e9udJ
function name:  test
number of ops:  6
compiled vars:  !0 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV_VARIADIC                                    !0      
   11     1        INIT_STATIC_METHOD_CALL                                  'test'
          2        SEND_UNPACK                                              !0
          3        CHECK_UNDEF_ARGS                                         
          4        DO_FCALL                                      1          
   12     5      > RETURN                                                   null

End of function test

End of class Baz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.6 ms | 1396 KiB | 15 Q