note 56361 deleted from function.empty by derek
| From: | derek@php.net | Date: | Wed, 31 Aug 2005 19:54:47 +0000 |
| Subject: | note 56361 deleted from function.empty by derek | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-94546@lists.php.net to get a copy of this message | ||
Note Submitter: ryan at ryanbrooks dot net
Reason: bad code
----
Re: tan_niao, admin at prelogic dot net, admin at ninthcircuit dot info
Instead of checking if a string is a space, don't use trim - there's an simpler (and
faster, in my benchmarks) method.
<?
function is_whitespace($str = '')
{
return ereg("^[[:space:]]*$", $str);
}
?>