3v4l.org

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

Class FooException: [no user functions]
Class BarException: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.5 ms | 1399 KiB | 15 Q