note 49319 deleted from function.include by aidan
| From: | aidan@php.net | Date: | Sat, 15 Apr 2006 16:36:34 +0000 |
| Subject: | note 49319 deleted from function.include by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-108169@lists.php.net to get a copy of this message | ||
Note Submitter: marcus at lastcraft dot com
----
Parse errors are not trapped in PHP 5.0.1 (probably other versions) with include(). Execution still
stops the script. This differs from PHP 4.
This is a shame as you could detect and react to errors with...
$old = ini_get('track_errors');
ini_set('track_errors', true);
include($file);
ini_set('track_errors', $old);
if (isset($php_errormsg)) {
// Perform remedial action
}
...but alas, not with PHP 5.