note 67634 added to function.strlen
| From: | nitrous at fuckoff dot com | Date: | Fri, 09 Jun 2006 01:05:46 +0000 |
| Subject: | note 67634 added to function.strlen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-113991@lists.php.net to get a copy of this message | ||
Don't use count with strings, and don't use strlen with arrays.
<?php
echo strlen(array()); // equals 5
echo strlen(array(1,2,3)); // equals 5
echo strlen(arrays_are_cool_man); // equals 19
?>
See the pattern?
----
Server IP: 66.163.161.117
Probable Submitter: 63.214.184.6
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.strlen.php
Edit -- http://master.php.net/note/edit/67634
Del: integrated -- http://master.php.net/note/delete/67634/integrated
Del: useless -- http://master.php.net/note/delete/67634/useless
Del: bad code -- http://master.php.net/note/delete/67634/bad+code
Del: spam -- http://master.php.net/note/delete/67634/spam
Del: non-english -- http://master.php.net/note/delete/67634/non-english
Del: in docs -- http://master.php.net/note/delete/67634/in+docs
Del: other reasons-- http://master.php.net/note/delete/67634
Reject -- http://master.php.net/note/reject/67634
Search -- http://master.php.net/manage/user-notes.php