> One of the downside of PHP IMHO is, that you do not have to define
> variables. This leads to a lot of errors. At least there should be a
> "option", which forces you to define variables, like maybe so:
I've not followed this thread but this is pretty much what E_NOTICE is
for, turn it on in error_reporting and it'll tell you every undefined
variable. Do this in php.ini or with error_reporting function. In fact,
one _should_ develop with E_ALL on.
if ($var) // will produce a Warning if $var is not set
echo $notset; // ditto
$arr[somekey] // Warning if constant variable somekey is
not defined (i.e. use 'quotes')
$arr['key'] // Warning if key 'key' not defined
See :
http://www.php.net/manual/en/phpdevel-errors.php
http://marc.theaimsgroup.com/?l=php-general&m=99486381324867
Much more can be said, hope the above helps.
Regards,
Philip Olson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]