note 111805 deleted from function.strlen by aharvey
| From: | aharvey@php.net | Date: | Thu, 04 Apr 2013 03:36:01 +0000 |
| Subject: | note 111805 deleted from function.strlen by aharvey | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-194315@lists.php.net to get a copy of this message | ||
Note Submitter: jjeffers at email dot arizona dot edu
----
(RE: strlen 5.3 return for array = NULL)
as a quick fix for an old program that evaluated arrays being set by using
"if(strlen($somearray)){}" I just added a function and did a find and replace on
"strlen(" to replace it with "mystrlen("
function mystrlen($s){
return is_array($s)?count($s):strlen($s);
}