3v4l.org

run code in 500+ PHP versions simultaneously
<?php error_reporting(E_ALL); class A_Error extends Exception {} class B_Error extends Exception {} class C_Error extends Exception {} try { throw new A_Error(); } catch (A_Error $e) { goto abc; } catch (B_Error $e) { goto abc; } catch (C_Error $e) { abc: var_dump(get_class($e)); echo "Gotta Catch 'Em All\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 7
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 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 107) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 13
2 jumps found. (Code = 107) Position 1 = 14, Position 2 = -2
Branch analysis from position: 14
Found catch point at position: 10
Branch analysis from position: 10
Found catch point at position: 13
Branch analysis from position: 13
filename:       /in/nFQ66
function name:  (null)
number of ops:  20
compiled vars:  !0 = $e
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                                   'error_reporting'
          1        SEND_VAL                                                     30719
          2        DO_ICALL                                                     
    9     3        NEW                                                  $2      'A_Error'
          4        DO_FCALL                                          0          
          5      > THROW                                             0          $2
          6*       JMP                                                          ->19
   11     7  E > > CATCH                                                        'A_Error', ->10
          8    > > JMP                                                          ->14
          9*       JMP                                                          ->19
   12    10  E > > CATCH                                                        'B_Error', ->13
         11    > > JMP                                                          ->14
         12*       JMP                                                          ->19
   13    13  E > > CATCH                                           last         'C_Error'
   15    14    >   INIT_FCALL                                                   'var_dump'
         15        GET_CLASS                                            ~4      !0
         16        SEND_VAL                                                     ~4
         17        DO_ICALL                                                     
   16    18        ECHO                                                         'Gotta+Catch+%27Em+All%0A'
   17    19      > RETURN                                                       1

Class A_Error: [no user functions]
Class B_Error: [no user functions]
Class C_Error: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.6 ms | 3079 KiB | 15 Q