3v4l.org

run code in 300+ PHP versions simultaneously
<?php function exception_error_handler($severity, $message, $file, $line) { if (!(error_reporting() & $severity)) { return; } throw new ErrorException($message, 0, $severity, $file, $line); } set_error_handler("exception_error_handler"); try { @unlink('/var/does/not/exist'); echo '\ErrorException not thrown'; } catch (ErrorException $e) { echo '\ErrorException thrown'; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 10
Branch analysis from position: 10
2 jumps found. (Code = 107) Position 1 = 11, Position 2 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pmcrt
function name:  (null)
number of ops:  13
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'set_error_handler'
          1        SEND_VAL                                                 'exception_error_handler'
          2        DO_ICALL                                                 
   11     3        BEGIN_SILENCE                                    ~2      
          4        INIT_FCALL                                               'unlink'
          5        SEND_VAL                                                 '%2Fvar%2Fdoes%2Fnot%2Fexist'
          6        DO_ICALL                                                 
          7        END_SILENCE                                              ~2
   12     8        ECHO                                                     '%5CErrorException+not+thrown'
          9      > JMP                                                      ->12
   13    10  E > > CATCH                                       last         'ErrorException'
   14    11    >   ECHO                                                     '%5CErrorException+thrown'
   15    12    > > RETURN                                                   1

Function exception_error_handler:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/pmcrt
function name:  exception_error_handler
number of ops:  19
compiled vars:  !0 = $severity, !1 = $message, !2 = $file, !3 = $line
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    3     4        INIT_FCALL                                               'error_reporting'
          5        DO_ICALL                                         $4      
          6        BW_AND                                           ~5      !0, $4
          7        BOOL_NOT                                         ~6      ~5
          8      > JMPZ                                                     ~6, ->10
    4     9    > > RETURN                                                   null
    6    10    >   NEW                                              $7      'ErrorException'
         11        SEND_VAR_EX                                              !1
         12        SEND_VAL_EX                                              0
         13        SEND_VAR_EX                                              !0
         14        SEND_VAR_EX                                              !2
         15        SEND_VAR_EX                                              !3
         16        DO_FCALL                                      0          
         17      > THROW                                         0          $7
    7    18*     > RETURN                                                   null

End of function exception_error_handler

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.1 ms | 1396 KiB | 19 Q