Doc #70177 [NEW]: Undecumented changes in mb_substr behavior
| From: | teo8976 at gmail dot com | Date: | Fri, 31 Jul 2015 16:08:53 +0000 |
| Subject: | Doc #70177 [NEW]: Undecumented changes in mb_substr behavior | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-12565@lists.php.net to get a copy of this message | ||
From: teo8976 at gmail dot com
Operating system: all
PHP version: Irrelevant
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:Undecumented changes in mb_substr behavior
Description:
------------
---
From manual page: http://www.php.net/function.mb-substr
---
Check this:
http://3v4l.org/e1Pc4
1) The behavior of mb_substr with a negative value as first parameter is
completely undocumented. (except for a user's comment)
As expected, it matches that of substr, using the negative value as a
starting character counting from the end of the string, but it needs to
be documented.
2) The behavior with a negative value as the first parameter and NULL as
the second changes at version 5.4.8
Starting from that version, it behaves as expected (taking the string to
its end); previous to that version it returns an empty string.
The behavior in older versions was obviously a bug, but the change
should be documented.
Also, if there's a value to be used instead of NULL as a workaround,
that needs to be documented too.
--
Edit bug report at https://bugs.php.net/bug.php?id=70177&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70177&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70177&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70177&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=70177&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=70177&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=70177&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=70177&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=70177&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=70177&r=support
Expected behavior: https://bugs.php.net/fix.php?id=70177&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=70177&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=70177&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=70177&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70177&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=70177&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=70177&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=70177&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70177&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=70177&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=70177&r=mysqlcfg