3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('EXCEPTION_CATCHER', PHP_VERSION_ID < 70000 ? Exception : Throwable); try{ throw new Exception('aaa'); }catch(EXCEPTION_CATCHER $e) { echo 'joho'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 15
Branch analysis from position: 15
2 jumps found. (Code = 107) Position 1 = 16, Position 2 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gj3Ir
function name:  (null)
number of ops:  18
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'EXCEPTION_CATCHER'
          2      > JMPZ                                                     <false>, ->6
          3    >   FETCH_CONSTANT                                   ~1      'Exception'
          4        QM_ASSIGN                                        ~2      ~1
          5      > JMP                                                      ->8
          6    >   FETCH_CONSTANT                                   ~3      'Throwable'
          7        QM_ASSIGN                                        ~2      ~3
          8    >   SEND_VAL                                                 ~2
          9        DO_ICALL                                                 
    6    10        NEW                                              $5      'Exception'
         11        SEND_VAL_EX                                              'aaa'
         12        DO_FCALL                                      0          
         13      > THROW                                         0          $5
         14*       JMP                                                      ->17
    7    15  E > > CATCH                                       last         'EXCEPTION_CATCHER'
    9    16    >   ECHO                                                     'joho'
   10    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.56 ms | 1395 KiB | 15 Q