3v4l.org

run code in 500+ PHP versions simultaneously
<?php interface i { function foo(): int; } class x implements i { #[Returntypewillchange] function foo() : int { return 'abc'; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AtbW9
function name:  (null)
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                                'x'
   10     1      > RETURN                                                       1

Class i:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AtbW9
function name:  foo
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 foo

End of class i.

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

End of function foo

End of class x.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
156.96 ms | 2711 KiB | 8 Q