Re: Question about empty();

From: Date: Tue, 18 Nov 2003 16:30:50 +0000
Subject: Re: Question about empty();
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-170123@lists.php.net to get a copy of this message
* Thus wrote John (jbr@ya-right.net): > Hi all > > This function I don't get at all, I hear all the time, "if you want to > practice smart coding then turn register globals off, and be sure you keep > query data out of your script that is not set or defined with something > expected". So why would there be a function that returns true or false, $var > is empty even if $var is not defined! Now I know you can do bool(), but the > function name (empty()) really states one thing "Does it have a value or (!) > not have value" and not "Does have a value or does (!) not have a value and > may be undefined too!" If you don't want to correct it then at least give a > warning if the $var being tested is undefined!~ > For the life of me I cant find your question in there. Curt -- "My PHP key is worn out" PHP List stats since 1997: http://zirzow.dyndns.org/html/mlists/

« previous php.general (#170123) next »