3v4l.org

run code in 300+ PHP versions simultaneously
<?php function exception_error_handler($severity, $message, $file, $line) { if (!(error_reporting() & $severity)) { // This error code is not included in error_reporting return; } throw new ErrorException($message, 0, $severity, $file, $line); } set_error_handler("exception_error_handler"); try { require_once 'nosuchfile.php'; } Catch (ErrorException $e) { var_dump($e); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 5
Branch analysis from position: 5
2 jumps found. (Code = 107) Position 1 = 6, Position 2 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Mfj5e
function name:  (null)
number of ops:  10
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'set_error_handler'
          1        SEND_VAL                                                 'exception_error_handler'
          2        DO_ICALL                                                 
   12     3        INCLUDE_OR_EVAL                                          'nosuchfile.php', REQUIRE_ONCE
          4      > JMP                                                      ->9
   13     5  E > > CATCH                                       last         'ErrorException'
   14     6    >   INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   15     9    > > 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/Mfj5e
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
    5     9    > > RETURN                                                   null
    7    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
    8    18*     > RETURN                                                   null

End of function exception_error_handler

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.65 ms | 1396 KiB | 19 Q