3v4l.org

run code in 500+ PHP versions simultaneously
<?php class x implements y { function foo(): bool { throw new exception('Ah!'); } } interface y { function foo(): bool; } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ea7eA
function name:  (null)
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                                'x'
   13     1      > RETURN                                                       1

Class x:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/ea7eA
function name:  foo
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   NEW                                                  $0      'exception'
          1        SEND_VAL_EX                                                  'Ah%21'
          2        DO_FCALL                                          0          
          3      > THROW                                             0          $0
    6     4*       VERIFY_RETURN_TYPE                                           
          5*     > RETURN                                                       null

End of function foo

End of class x.

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

End of function foo

End of class y.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.65 ms | 872 KiB | 8 Q