Doc #53935 [NEW]: Wrong Return Value for substr()
| From: | miqrogroove at gmail dot com | Date: | Sat, 05 Feb 2011 21:38:44 +0000 |
| Subject: | Doc #53935 [NEW]: Wrong Return Value for substr() | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-5921@lists.php.net to get a copy of this message | ||
From:
Operating system: Linux
PHP version: 5.2.17
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:Wrong Return Value for substr()
Description:
------------
---
From manual page: http://www.php.net/function.substr#Changelog
---
According to the "Changelog" this function should return FALSE for
substr('abc', -
7) in 5.2.2+. The actual return value is 'abc' in version 5.2.16. Did not
test
5.2.17, but the manual is obviously wrong.
Test script:
---------------
echo substr('abc', -7);
Expected result:
----------------
No output.
Actual result:
--------------
abc
--
Edit bug report at http://bugs.php.net/bug.php?id=53935&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53935&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53935&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53935&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=53935&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53935&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=53935&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=53935&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=53935&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=53935&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=53935&r=support
Expected behavior: http://bugs.php.net/fix.php?id=53935&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=53935&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=53935&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=53935&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53935&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=53935&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=53935&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=53935&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=53935&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=53935&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=53935&r=mysqlcfg