3v4l.org

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

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

End of function test

End of class A.

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

End of function test

End of class B.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.77 ms | 1599 KiB | 13 Q