I tried using register_shutdown and set_error_handler together but no luck.Does anyone know another solution to this problem?
1 Answer
here is a snippet from the documentations
The following error types cannot be handled with a user defined function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, and most of E_STRICT raised in the file where set_error_handler() is called.
E_PARSE stops the execution immediately so it will have no way to call any other function
1 Comment
Mehman Manafov
E_ERROR stops the execution too but it is possible to catch E_ERROR within register_shutdown() function using error_get_last() function and call custom error handler with that error.but it doesnt work with E_PARSE error.so register_shutdown() is not called when E_PARSE error happened?