> 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. > > Can somebody tell me which M to FR ?
The closest you can come is to set your error_reporting() to E_ALL. Then you'll get notices about undefined variables and keys for arrays, but the script will not die. You can do some FR at www.php.net/error_reporting. :) ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php