3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { throw new Exception("Ouch!"); } catch (Exception $e) { echo "Exception: " . $e->getMessage(); } catch (Error $error) { echo "Error: " . $error->getMessage(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 5
Branch analysis from position: 5
2 jumps found. (Code = 107) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 107) Position 1 = 12, Position 2 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 11
Branch analysis from position: 11
filename:       /in/qJAJ1
function name:  (null)
number of ops:  17
compiled vars:  !0 = $e, !1 = $error
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $2      'Exception'
          1        SEND_VAL_EX                                              'Ouch%21'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $2
          4*       JMP                                                      ->16
    5     5  E > > CATCH                                                    'Exception', ->11
    6     6    >   INIT_METHOD_CALL                                         !0, 'getMessage'
          7        DO_FCALL                                      0  $4      
          8        CONCAT                                           ~5      'Exception%3A+', $4
          9        ECHO                                                     ~5
         10      > JMP                                                      ->16
    7    11  E > > CATCH                                       last         'Error'
    8    12    >   INIT_METHOD_CALL                                         !1, 'getMessage'
         13        DO_FCALL                                      0  $6      
         14        CONCAT                                           ~7      'Error%3A+', $6
         15        ECHO                                                     ~7
    9    16    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.97 ms | 1393 KiB | 13 Q