3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ExceptionX extends Exception { } class ExceptionY extends Exception { } class ExceptionZ extends Exception { } function t() { throw new ExceptionZ(); } try { t(); } catch (Exception $e) { switch(get_class($e)) { case 'ExceptionX': /** fall through */ case 'ExceptionY': /** fall through */ /* handle the ones we want here */ break; default: throw $e; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 3
Branch analysis from position: 3
2 jumps found. (Code = 107) Position 1 = 4, Position 2 = -2
Branch analysis from position: 4
4 jumps found. (Code = 188) Position 1 = 11, Position 2 = 11, Position 3 = 12, Position 4 = 6
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
Branch analysis from position: 12
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 11
Branch analysis from position: 11
filename:       /in/meYrA
function name:  (null)
number of ops:  15
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               't'
          1        DO_FCALL                                      0          
          2      > JMP                                                      ->14
   11     3  E > > CATCH                                       last         'Exception'
   12     4    >   GET_CLASS                                        ~2      !0
          5      > SWITCH_STRING                                            ~2, [ 'ExceptionX':->11, 'ExceptionY':->11, ], ->12
   13     6    >   CASE                                                     ~2, 'ExceptionX'
          7      > JMPNZ                                                    ~3, ->11
   14     8    >   CASE                                                     ~2, 'ExceptionY'
          9      > JMPNZ                                                    ~3, ->11
         10    > > JMP                                                      ->12
   16    11    > > JMP                                                      ->13
   19    12    > > THROW                                         0          !0
         13    >   FREE                                                     ~2
   21    14    > > RETURN                                                   1

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

End of function t

Class ExceptionX: [no user functions]
Class ExceptionY: [no user functions]
Class ExceptionZ: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.32 ms | 1390 KiB | 14 Q