3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo rand();die(); 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 = 79) Position 1 = -2
Found catch point at position: 7
Branch analysis from position: 7
2 jumps found. (Code = 107) Position 1 = 8, Position 2 = -2
Branch analysis from position: 8
4 jumps found. (Code = 188) Position 1 = 15, Position 2 = 15, Position 3 = 16, Position 4 = 10
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
Branch analysis from position: 16
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 15
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 15
Branch analysis from position: 15
filename:       /in/bJcS0
function name:  (null)
number of ops:  19
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'rand'
          1        DO_ICALL                                         $1      
          2        ECHO                                                     $1
          3      > EXIT                                                     
   10     4*       INIT_FCALL                                               't'
          5*       DO_FCALL                                      0          
          6*       JMP                                                      ->18
   11     7  E > > CATCH                                       last         'Exception'
   12     8    >   GET_CLASS                                        ~3      !0
          9      > SWITCH_STRING                                            ~3, [ 'ExceptionX':->15, 'ExceptionY':->15, ], ->16
   13    10    >   CASE                                                     ~3, 'ExceptionX'
         11      > JMPNZ                                                    ~4, ->15
   14    12    >   CASE                                                     ~3, 'ExceptionY'
         13      > JMPNZ                                                    ~4, ->15
         14    > > JMP                                                      ->16
   16    15    > > JMP                                                      ->17
   19    16    > > THROW                                         0          !0
         17    >   FREE                                                     ~3
   21    18      > RETURN                                                   1

Function t:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/bJcS0
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:
160.67 ms | 1399 KiB | 16 Q