The is_readable function could be used to check whether a file has been include successfully.
<php
include "file.php";
if (is_readable('file.php')) {
print 'file included successfully';
}
?>
You might wonder what is the point of checking for an included file when the compiler would generate an error a called file is missing or could not be included for some other reason. This sort of check is useful in unit testing and skillful exception handling would allow you to handle this error gracefully.