3v4l.org

run code in 500+ 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 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 4
Found catch point at position: 9
Branch analysis from position: 9
2 jumps found. (Code = 107) Position 1 = 10, Position 2 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JqGgE
function name:  (null)
number of ops:  17
compiled vars:  !0 = $e
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   FRAMELESS_ICALL_1                class_exists        ~1      'Error'
          1        BOOL_NOT                                             ~2      ~1
          2      > JMPZ                                                         ~2, ->4
    4     3    >   DECLARE_CLASS                                                'error', 'exception'
   10     4    >   NEW                                                  $3      'Error'
          5        SEND_VAL_EX                                                  'Some+problem+description'
          6        DO_FCALL                                          0          
          7      > THROW                                             0          $3
          8*       JMP                                                          ->16
   11     9  E > > CATCH                                           last         'Error'
   12    10    >   ROPE_INIT                                         3  ~7      'Error+caught%3A+'
         11        INIT_METHOD_CALL                                             !0, 'getMessage'
         12        DO_FCALL                                          0  $5      
         13        ROPE_ADD                                          1  ~7      ~7, $5
         14        ROPE_END                                          2  ~6      ~7, '%0A'
         15        ECHO                                                         ~6
   13    16      > RETURN                                                       1

Class Error: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
173.58 ms | 3269 KiB | 13 Q