note 111805 added to function.strlen
| From: | jjeffers at email dot arizona dot edu | Date: | Sat, 30 Mar 2013 05:52:00 +0000 |
| Subject: | note 111805 added to function.strlen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-194272@lists.php.net to get a copy of this message | ||
(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);
}
----
Server IP: 69.147.83.199
Probable Submitter: 74.219.190.234
----
Manual Page -- http://php.net/manual/en/function.strlen.php
Edit -- https://master.php.net/note/edit/111805
Del: integrated -- https://master.php.net/note/delete/111805/integrated
Del: useless -- https://master.php.net/note/delete/111805/useless
Del: bad code -- https://master.php.net/note/delete/111805/bad+code
Del: spam -- https://master.php.net/note/delete/111805/spam
Del: non-english -- https://master.php.net/note/delete/111805/non-english
Del: in docs -- https://master.php.net/note/delete/111805/in+docs
Del: other reasons-- https://master.php.net/note/delete/111805
Reject -- https://master.php.net/note/reject/111805
Search -- https://master.php.net/manage/user-notes.php