3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface I { public function foo(object $object = new stdClass): void; } class Foo implements I { private string $value = 'foo'; #[Override] public function foo(object $object = new self): never { die($object->value); } } (new Foo())->foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fWeFh
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'foo'
   16     1        NEW                                              $0      'Foo'
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $0, 'foo'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class I:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fWeFh
function name:  foo
number of ops:  2
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV_INIT                                        !0      <const ast>
          1      > RETURN                                                   null

End of function foo

End of class I.

Class Foo:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/fWeFh
function name:  foo
number of ops:  4
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV_INIT                                        !0      <const ast>
   12     1        FETCH_OBJ_R                                      ~1      !0, 'value'
          2      > EXIT                                                     ~1
   13     3*     > VERIFY_NEVER_TYPE                                        

End of function foo

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.39 ms | 1002 KiB | 13 Q