I think it would be useful if require would throw an exception on failure.
Currently one would use @include in order to load in a file that could be missing or could contain parse errors. However it is impossible to easy find out if the file was missing, had parse errors or returned false.
Please also note that file_exists() doesnt check the include path and a check like this also opens up the chance for race conditions etc.
By throwing an exception inside require with the necessary information it would be able to cleanly handle this situation without having to silence this error and then parsing the error message. And it would obviously be BC compatible as uncaught exceptions are fatal.
regards, Lukas Smith
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php