3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { $error = 'Always throw this error'; throw new Exception($error); // Code following an exception is not executed. echo 'Never executed'; } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\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 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BNkkm
function name:  (null)
number of ops:  14
compiled vars:  !0 = $error, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 'Always+throw+this+error'
    5     1        NEW                                              $3      'Exception'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4      > THROW                                         0          $3
    8     5*       ECHO                                                     'Never+executed'
          6*       JMP                                                      ->13
   10     7  E > > CATCH                                       last         'Exception'
   11     8    >   ECHO                                                     'Caught+exception%3A+'
          9        INIT_METHOD_CALL                                         !1, 'getMessage'
         10        DO_FCALL                                      0  $5      
         11        ECHO                                                     $5
         12        ECHO                                                     '%0A'
   12    13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.13 ms | 1393 KiB | 13 Q