3 ms·
Thanks for the read! I appreciate the thought and work you put into this. And now my obligatory gripes! Under the PHP section you claim "if an included file
by zelon88 7y ago
Thanks for the read! I appreciate the thought and work you put into this. And now my obligatory gripes!
Under the PHP section you claim
"if an included file must return a value but the file cannot be included, include statement returns FALSE and only generates a warning. If a file is required, one must use require()."
How is that a negative? That sounds like expected behavior to me and I can't imagine it working any other way.
$error = include('script.php'); // Return FALSE and continue anyway.
require('script.php'); // Die with error.
How is that undesirable/wrong? It lets you do things like...
$error = include('script-A.php');
if ($error == FALSE) require('script-B.php');