Bug->Doc #73076 [Opn]: php compatibility: mb_strpos()
| From: | cmb@php.net | Date: | Wed, 14 Sep 2016 01:25:11 +0000 |
| Subject: | Bug->Doc #73076 [Opn]: php compatibility: mb_strpos() | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-13898@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73076&edit=1
ID: 73076
Updated by: cmb@php.net
Reported by: lars at moelleken dot org
Summary: php compatibility: mb_strpos()
Status: Open
-Type: Bug
+Type: Documentation Problem
-Package: Strings related
+Package: mbstring related
Operating System: Ubuntu 12.04.5 LTS
PHP Version: 7.1.0RC1
Block user comment: N
Private report: N
New Comment:
This behavioral change is caused by a deliberate improvement,
namely to generalize the support for negative string offsets,
see <https://wiki.php.net/rfc/negative-string-offsets>.
While this change is mentioned in UPGRADING[1] it is apparently
not yet documented in the manual. Therefore I'm changing to
doc-bug.
[1] <https://github.com/php/php-src/blob/php-7.1.0RC1/UPGRADING>
Previous Comments:
------------------------------------------------------------------------
[2016-09-14 01:08:18] lars at moelleken dot org
Description:
------------
mb_strpos() is not compatible with old PHP versions.
https://3v4l.org/TsMA9
Test script:
---------------
var_dump(mb_strpos('ABC-ÃÃÃ-ð©-' . "\xc3\x28" .
'ä¸æç©ºç½-ä¸æç©ºç½' . "\xf0\x28\x8c\x28" .
'abc', 'ç½', -8));
Expected result:
----------------
bool(false)
Actual result:
--------------
int(20)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73076&edit=1