3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface A { static function make(): A; } class B implements A { static function make(): B { return new B(); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/b2gMm
function name:  (null)
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   DECLARE_CLASS                                            'b'
   10     1      > RETURN                                                   1

Class A:
Function make:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/b2gMm
function name:  make
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   VERIFY_RETURN_TYPE                                       
          1      > RETURN                                                   null

End of function make

End of class A.

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

End of function make

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.95 ms | 1384 KiB | 13 Q