Re: PHP_SELF or REQUEST_URI within Function ?

From: Date: Fri, 31 Aug 2001 15:44:54 +0000
Subject: Re: PHP_SELF or REQUEST_URI within Function ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-65502@lists.php.net to get a copy of this message
> 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

« previous php.general (#65502) next »