3v4l.org

run code in 300+ PHP versions simultaneously
<?php function exception_error_handler($errno, $errstr, $errfile, $errline, $errcontext) { echo $err_context; /* 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/N7ffH
function name:  (null)
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   INIT_FCALL                                               'set_error_handler'
          1        SEND_VAL                                                 'exception_error_handler'
          2        DO_ICALL                                                 
   27     3        FETCH_DIM_R                                      ~2      !0, 1
          4        FREE                                                     ~2
   63     5      > RETURN                                                   1

Function exception_error_handler:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/N7ffH
function name:  exception_error_handler
number of ops:  17
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
   20     6        NEW                                              $6      'ErrorException'
          7        SEND_VAR_EX                                              !1
          8        SEND_VAL_EX                                              0
          9        SEND_VAR_EX                                              !0
         10        SEND_VAR_EX                                              !2
         11        SEND_VAR_EX                                              !3
         12        SEND_VAR_EX                                              !4
         13        DO_FCALL                                      0          
         14      > THROW                                         0          $6
   22    15*       RETURN                                                   <false>
   23    16*     > RETURN                                                   null

End of function exception_error_handler

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.75 ms | 1395 KiB | 15 Q