3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface InterfaceA {} class ExceptionA extends Exception implements InterfaceA {} function throwException() { throw new ExceptionA(); } try { throwException(); } catch (InterfaceA $error) { printf('Caught %s', get_class($error)); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 4
Branch analysis from position: 4
2 jumps found. (Code = 107) Position 1 = 5, Position 2 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eg3Xa
function name:  (null)
number of ops:  11
compiled vars:  !0 = $error
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   DECLARE_CLASS                                            'exceptiona', 'exception'
   12     1        INIT_FCALL                                               'throwexception'
          2        DO_FCALL                                      0          
          3      > JMP                                                      ->10
   13     4  E > > CATCH                                       last         'InterfaceA'
   14     5    >   INIT_FCALL                                               'printf'
          6        SEND_VAL                                                 'Caught+%25s'
          7        GET_CLASS                                        ~2      !0
          8        SEND_VAL                                                 ~2
          9        DO_ICALL                                                 
   15    10    > > RETURN                                                   1

Function throwexception:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/eg3Xa
function name:  throwException
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $0      'ExceptionA'
          1        DO_FCALL                                      0          
          2      > THROW                                         0          $0
    9     3*     > RETURN                                                   null

End of function throwexception

Class InterfaceA: [no user functions]
Class ExceptionA: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.47 ms | 1428 KiB | 15 Q