3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Foo { } class FooExtended extends Foo { } abstract class AbstractTest { abstract function test(); } class TestImpl extends AbstractTest { function test() : FooExtended { return new FooExtended(); } } $t = new TestImpl();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GoH1S
function name:  (null)
number of ops:  4
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   NEW                                              $1      'TestImpl'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
          3      > RETURN                                                   1

Class Foo: [no user functions]
Class FooExtended: [no user functions]
Class AbstractTest:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GoH1S
function name:  test
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E > > RETURN                                                   null

End of function test

End of class AbstractTest.

Class TestImpl:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GoH1S
function name:  test
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $0      'FooExtended'
          1        DO_FCALL                                      0          
          2        VERIFY_RETURN_TYPE                                       $0
          3      > RETURN                                                   $0
   24     4*       VERIFY_RETURN_TYPE                                       
          5*     > RETURN                                                   null

End of function test

End of class TestImpl.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.02 ms | 1393 KiB | 13 Q