3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A extends Exception {} class B extends Exception {} try { throw new A('a'); } catch (A $e) { var_dump($e->getMessage()); throw new B('b'); } catch (Exception $e) { var_dump($e->getMessage()); }
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 = 16
Branch analysis from position: 6
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 107) Position 1 = 17, Position 2 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 16
Branch analysis from position: 16
filename:       /in/6F1Am
function name:  (null)
number of ops:  23
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $1      'A'
          1        SEND_VAL_EX                                              'a'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $1
          4*       JMP                                                      ->22
    8     5  E > > CATCH                                                    'A', ->16
    9     6    >   INIT_FCALL                                               'var_dump'
          7        INIT_METHOD_CALL                                         !0, 'getMessage'
          8        DO_FCALL                                      0  $3      
          9        SEND_VAR                                                 $3
         10        DO_ICALL                                                 
   10    11        NEW                                              $5      'B'
         12        SEND_VAL_EX                                              'b'
         13        DO_FCALL                                      0          
         14      > THROW                                         0          $5
         15*       JMP                                                      ->22
   11    16  E > > CATCH                                       last         'Exception'
   12    17    >   INIT_FCALL                                               'var_dump'
         18        INIT_METHOD_CALL                                         !0, 'getMessage'
         19        DO_FCALL                                      0  $7      
         20        SEND_VAR                                                 $7
         21        DO_ICALL                                                 
   13    22      > RETURN                                                   1

Class A: [no user functions]
Class B: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.65 ms | 1395 KiB | 15 Q