#44644 [Opn->Bgs]: strlen gives false result if the string have "\0"
| From: | derick@php.net | Date: | Sat, 05 Apr 2008 10:40:14 +0000 |
| Subject: | #44644 [Opn->Bgs]: strlen gives false result if the string have "\0" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-123984@lists.php.net to get a copy of this message | ||
ID: 44644
Updated by: derick@php.net
Reported By: zhangsilly at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: *General Issues
Operating System: Windows XP
PHP Version: 5.2.5
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
That is correct, PHP is binary safe.
Previous Comments:
------------------------------------------------------------------------
[2008-04-05 03:36:06] zhangsilly at gmail dot com
Description:
------------
strlen seems return the bytes of the string used,not the length of the
string.
Reproduce code:
---------------
<?php
$string = "\0\0\0\0\0\0";
echo strlen($string);
?>
Expected result:
----------------
0
Actual result:
--------------
6
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44644&edit=1