3v4l.org

run code in 300+ PHP versions simultaneously
<?php function exception_error_handler($errno, $errstr, $errfile, $errline, $errcontext) { echo $err_context; die; /* if (error_reporting() == 0) { return; } //if (error_reporting() & $severity) { throw new ErrorException($message, 0, $severity, $filename, $lineno); //} */ // will be caught by FunkyExceptionHandler if not handled throw new ErrorException($errstr, 0, $errno, $errfile, $errline, $errcontext); //throw new RuntimeErrorException($errstr, $errno, 0, $errfile, $errline, $errcontext); return false; } set_error_handler("exception_error_handler"); $a[1]; /* throw new MyException('This is a really bad error', 123); final public ExceptionException::getPrevious ( void ) error_reporting(E_ALL); function exception_error_handler($errno, $errstr, $errfile, $errline ) { throw new ErrorException($errstr, '00007600', $errno, $errfile, $errline, new Exception('jjj')); } set_error_handler("exception_error_handler"); try { echo $x; } catch(Exception $e) { var_dump($e->getPrevious()); }*/
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/df8b1
function name:  (null)
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   INIT_FCALL                                               'set_error_handler'
          1        SEND_VAL                                                 'exception_error_handler'
          2        DO_ICALL                                                 
   29     3        FETCH_DIM_R                                      ~2      !0, 1
          4        FREE                                                     ~2
   65     5      > RETURN                                                   1

Function exception_error_handler:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/df8b1
function name:  exception_error_handler
number of ops:  18
compiled vars:  !0 = $errno, !1 = $errstr, !2 = $errfile, !3 = $errline, !4 = $errcontext, !5 = $err_context
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
          4        RECV                                             !4      
    5     5        ECHO                                                     !5
    7     6      > EXIT                                                     
   22     7*       NEW                                              $6      'ErrorException'
          8*       SEND_VAR_EX                                              !1
          9*       SEND_VAL_EX                                              0
         10*       SEND_VAR_EX                                              !0
         11*       SEND_VAR_EX                                              !2
         12*       SEND_VAR_EX                                              !3
         13*       SEND_VAR_EX                                              !4
         14*       DO_FCALL                                      0          
         15*       THROW                                         0          $6
   24    16*       RETURN                                                   <false>
   25    17*     > RETURN                                                   null

End of function exception_error_handler

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.6 ms | 1395 KiB | 15 Q