Why some php errors are not captured by Yii error control system?

Some erros (php errors and/or exceptions) are normally captured by Yii error system and displayed in Yii error pages based on our configuration (setting system views or an action to display erros). But sometimes i see this all bypassed and i have the normal php output fo erros why?

Some PHP errors such as syntax error are not caughtable.

Quote

Some PHP errors such as syntax error are not caughtable.
you mean that they are not supported/captured by set_error_hanlder and set_exception_handler php function?

right.

Try to put this before require_once($yii), in index.php:




error_reporting(E_ALL);

ini_set('display_errors', 0);


function shutdown() {

	if ($error = error_get_last()) {

		echo "Script execution halted ({$error['message']})";

		var_dump($error);

	}


}


register_shutdown_function('shutdown');



Sure there’s a smarter way of doing it ;)