On Mon, 23 Jun 2003 14:51:22 +0100, Dave Restall - System Administrator <[EMAIL PROTECTED]> wrote:

Hi,

Done a lot of Perl & PHP coding over the years and one thing I _really_
liked about Perl is its 'use strict;' directive.  For those of you not
familiar with Perl, this made the script die if you don't (among other
things) declare your variables before using them.

Once the fingers are flying, stupid typing mistakes often come in and
it is more often when a variable name is being typed.  It would be
interesting to see how many PHP coders out there have spent ages trying
to find a bug in their code that was due to them mis-spelling a variable
or method name.

Anyway, I can't find a reference to anything in the manual that will
force PHP to strictly check variable names etc. to see if they are
declared before use and if not throw up an error.


try set_error_handler()


On the error types it can catch (E_WARNING & E_NOTICE, as well as E_USER type errors), you can simply tell it to debug however you want and then exit. I have a rather large site that emails me whenever any sort of non- E_USER error happens. I usually get it fixed before the client realizes anything is wrong.

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to