note 76160 deleted from function.strlen by danbrown

From: Date: Thu, 12 Feb 2009 03:14:13 +0000
Subject: note 76160 deleted from function.strlen by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-150535@lists.php.net to get a copy of this message
Note Submitter: Mike Rosoft ---- The function "empty" tests whether a variable will evaluate as FALSE; the string '0' (as well as the number 0) does. Another simple way of testing for an empty string is: if($string=='') foo(); else bar(); This will match an empty string and anything that converts to it (such as NULL/unset variable), but not the number zero as either a number or a string.

« previous php.notes (#150535) next »