Hi,
I am developing and supporting a kinda big project which uses to include at
least 25 files (it is written in OO manner thus those many files). The
engine (ZE1) has different behavior on Parse Error. If a file is require()-d
but is not there the script terminates - that's ok. But when the file is
there and have a typo in it -> the engine says that there is parse error in
the file and continues with the execution.
I found a way to workaround this but I think it is more a hack than
something common.
require (in my case require_once()) returns 1 when there is no parse error
(the file is there) and bool(false) if the compilation was unsuccessful (the
file is there). I can die() when require returns false but .. IMO this is
not clean.
 One more thing that is different. The docs say that a handler registered
with set_error_handler() cannot catch E_PARSE but in fact it can. The
function catches the error in case the file is not found and the script
terminates but it is not callen in the former case when there is a typo in
the file.

Regards,
Andrey



-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to