3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class ExceptionA extends Exception {} class ExceptionB extends ExceptionA {} class ExceptionTest { public function example() { try { throw new ExceptionB(); } catch ( ExceptionB $e ) { echo 'ExceptionB was caught'; } catch ( ExceptionA $e ) { echo 'ExceptionA was caught'; } catch ( Exception $e ) { echo 'Exception was caught'; } } } (new ExceptionTest())->example();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/htgEg
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   NEW                                              $0      'ExceptionTest'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'example'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Class ExceptionA: [no user functions]
Class ExceptionB: [no user functions]
Class ExceptionTest:
Function example:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 4
Branch analysis from position: 4
2 jumps found. (Code = 107) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 107) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 10
2 jumps found. (Code = 107) Position 1 = 11, Position 2 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 7
Branch analysis from position: 7
Found catch point at position: 10
Branch analysis from position: 10
filename:       /in/htgEg
function name:  example
number of ops:  13
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'ExceptionB'
          1        DO_FCALL                                      0          
          2      > THROW                                         0          $1
          3*       JMP                                                      ->12
   14     4  E > > CATCH                                                    'ExceptionB', ->7
   15     5    >   ECHO                                                     'ExceptionB+was+caught'
          6      > JMP                                                      ->12
   16     7  E > > CATCH                                                    'ExceptionA', ->10
   17     8    >   ECHO                                                     'ExceptionA+was+caught'
          9      > JMP                                                      ->12
   18    10  E > > CATCH                                       last         'Exception'
   19    11    >   ECHO                                                     'Exception+was+caught'
   21    12    > > RETURN                                                   null

End of function example

End of class ExceptionTest.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.38 ms | 1395 KiB | 13 Q