Code: Select all
<?php
ini_set ("display_errors", "0");
function test ($i)
{
return ($i + 1);
}
test ($problem); //Notice: undefined variable
echo ("Script execution continues..."); //Unfortunately...
?>Is there any way to log everything (including notices) and terminate the script ?
PS: I've already looked into set_error_handler, but:
" 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."
Thanks in advance !