3v4l.org

run code in 500+ PHP versions simultaneously
<?php interface i {} class x extends \Exception implements i {} try { throw new x(); } catch (i $x) { print "Caught!"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 5
Branch analysis from position: 5
2 jumps found. (Code = 107) Position 1 = 6, Position 2 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JfE8M
function name:  (null)
number of ops:  8
compiled vars:  !0 = $x
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   DECLARE_CLASS                                                'x', 'exception'
    8     1        NEW                                                  $1      'x'
          2        DO_FCALL                                          0          
          3      > THROW                                             0          $1
          4*       JMP                                                          ->7
    9     5  E > > CATCH                                           last         'i'
   10     6    >   ECHO                                                         'Caught%21'
   11     7      > RETURN                                                       1

Class i: [no user functions]
Class x: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
136.48 ms | 1478 KiB | 13 Q