Re: isset()

From: Date: Sun, 25 Feb 2001 08:31:03 +0000
Subject: Re: isset()
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-41561@lists.php.net to get a copy of this message
> you do not want to use strlen() for the following reasons: > 1) makes code unreadable -> very sloppy Yeah and your if(isset($var) && $var != '') is pretty > 2) overhead You call one function and do two comparisons - vs an age old C function .... I'd like to run some numbers on that. > 3) it will give a warning when $var is not set (error_reporting 15 > only). I run on the default error_reporting setting and it's never complained so far. --Joe > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- ------------------------------------------------------------------------------- Joe Stump, PHP Hacker, joestump98@yahoo.com -o) http://www.miester.org http://www.care2.com /\\ "It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V -------------------------------------------------------------------------------

« previous php.general (#41561) next »