3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (!class_exists('Error')) { class Error extends Exception { } } try { throw new Error('Some problem description'); } catch(Error $e) { echo "Error caught: {$e->getMessage()}\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 6
Found catch point at position: 11
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
filename:       /in/JqGgE
function name:  (null)
number of ops:  19
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'class_exists'
          1        SEND_VAL                                                 'Error'
          2        DO_ICALL                                         $1      
          3        BOOL_NOT                                         ~2      $1
          4      > JMPZ                                                     ~2, ->6
    4     5    >   DECLARE_CLASS                                            'error', 'exception'
   10     6    >   NEW                                              $3      'Error'
          7        SEND_VAL_EX                                              'Some+problem+description'
          8        DO_FCALL                                      0          
          9      > THROW                                         0          $3
         10*       JMP                                                      ->18
   11    11  E > > CATCH                                       last         'Error'
   12    12    >   ROPE_INIT                                     3  ~7      'Error+caught%3A+'
         13        INIT_METHOD_CALL                                         !0, 'getMessage'
         14        DO_FCALL                                      0  $5      
         15        ROPE_ADD                                      1  ~7      ~7, $5
         16        ROPE_END                                      2  ~6      ~7, '%0A'
         17        ECHO                                                     ~6
   13    18      > RETURN                                                   1

Class Error: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.68 ms | 1395 KiB | 15 Q