3v4l.org

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

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

End of function new

End of class A.

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

End of function new

End of class B.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
153.21 ms | 892 KiB | 8 Q