Bug #73075 [Opn->Dup]: php compatibility: substr_count()
| From: | cmb@php.net | Date: | Wed, 14 Sep 2016 01:31:48 +0000 |
| Subject: | Bug #73075 [Opn->Dup]: php compatibility: substr_count() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-204018@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73075&edit=1
ID: 73075
Updated by: cmb@php.net
Reported by: lars at moelleken dot org
Summary: php compatibility: substr_count()
-Status: Open
+Status: Duplicate
Type: Bug
Package: Strings related
Operating System: Ubuntu 12.04.5 LTS
PHP Version: 7.1.0RC1
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Basically, this is a duplicate of bug #73076 â not only
mb_strpos(), but also substr_count() and several other functions
have been enhanced to also accept negative string offsets, see
<https://github.com/php/php-src/blob/php-7.1.0RC1/UPGRADING>.
Previous Comments:
------------------------------------------------------------------------
[2016-09-14 01:00:46] lars at moelleken dot org
Description:
------------
substr_count() (PHP 7.1RC1) is not compatible with previews PHP versions
https://3v4l.org/SfHKl
Test script:
---------------
var_dump(substr_count('abcde', 'de', -2, 2));
Expected result:
----------------
bool(false)
Actual result:
--------------
int(1)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73075&edit=1