Re: error handling
| From: | Kjartan Mannes | Date: | Mon, 18 Nov 2002 10:23:47 +0000 |
| Subject: | Re: error handling | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-91242@lists.php.net to get a copy of this message | ||
Monday, November 18, 2002, 11:23:08 AM, Derick Rethans wrote:
> That can be done, but I don't like this. You should not have any
> parse errors in your code anyway, so it just should fail as hard as
> possible.
Can't argue with that, however (;)), I find it annoying that PHP stops
processing if there is a parse error passed to an eval() command. I'd
like a way to make eval() just return E_PARSE if the script passed to it
fails. Or a more general command to verify PHP code
php_valid($code_str). That way the people who expect parse errors in
their include files can do
$code_str(implode("", file("include.inc")));
if (php_valid($code_str)) {
include_once("include.inc");
}
--
Kjartan <kjartan@zind.net> (http://natrak.net/)
:: "Programming is like sex: one mistake and you have to
support it for the rest of your life." - Michael Sinz