3v4l.org

run code in 300+ PHP versions simultaneously
<?php class FirstException extends Exception {} class SecondException extends Exception {} try { a: throw new FirstException("first exception\n"); b: throw new SecondException("second exception\n"); c: echo "Made it past both exceptions\n"; } catch (FirstException $e) { echo $e->getMessage(); goto b; } catch(SecondException $e) { echo $e->getMessage(); goto c; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 10
Branch analysis from position: 10
2 jumps found. (Code = 107) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
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 = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 16
Branch analysis from position: 16
filename:       /in/tMp71
function name:  (null)
number of ops:  22
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $1      'FirstException'
          1        SEND_VAL_EX                                              'first+exception%0A'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $1
    9     4    >   NEW                                              $3      'SecondException'
          5        SEND_VAL_EX                                              'second+exception%0A'
          6        DO_FCALL                                      0          
          7      > THROW                                         0          $3
   10     8    >   ECHO                                                     'Made+it+past+both+exceptions%0A'
          9      > JMP                                                      ->21
   11    10  E > > CATCH                                                    'FirstException', ->16
   12    11    >   INIT_METHOD_CALL                                         !0, 'getMessage'
         12        DO_FCALL                                      0  $5      
         13        ECHO                                                     $5
   13    14      > JMP                                                      ->4
         15*       JMP                                                      ->21
   14    16  E > > CATCH                                       last         'SecondException'
   15    17    >   INIT_METHOD_CALL                                         !0, 'getMessage'
         18        DO_FCALL                                      0  $6      
         19        ECHO                                                     $6
   16    20      > JMP                                                      ->8
   17    21    > > RETURN                                                   1

Class FirstException: [no user functions]
Class SecondException: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.54 ms | 1398 KiB | 13 Q