Bug #76526 [Com]: Different behaviour shorthand escape codes vs unicode
| From: | bugs dot php dot net_nospam at adviesenzo dot nl | Date: | Mon, 25 Jun 2018 10:08:56 +0000 |
| Subject: | Bug #76526 [Com]: Different behaviour shorthand escape codes vs unicode | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-215966@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76526&edit=1
ID: 76526
Comment by: bugs dot php dot net_nospam at adviesenzo dot nl
Reported by: bugs dot php dot net_nospam at adviesenzo dot nl
Summary: Different behaviour shorthand escape codes vs
unicode
Status: Duplicate
Type: Bug
Package: PCRE related
PHP Version: 7.3.0alpha2
Block user comment: N
Private report: N
New Comment:
Hi Nikita, thanks!
I'd searched, but only looked at the open issues, so I missed that it had been reported and
fixed already ;-)
Previous Comments:
------------------------------------------------------------------------
[2018-06-25 10:01:50] nikic@php.net
Duplicate of bug #76512. This will be fixed in the next alpha :)
------------------------------------------------------------------------
[2018-06-25 09:59:53] bugs dot php dot net_nospam at adviesenzo dot nl
Description:
------------
Not sure whether this is a bug or a feature, so reporting this for someone else to make that
determination.
PCRE used to find a match using the below example code on PHP < 7.3, but no longer matches on PHP
7.3.
See: https://3v4l.org/lunKA
Is suspect the behavioural change is related to the implementation of PCRE 2 in PHP 7.3 - https://wiki.php.net/rfc/pcre2-migration .
Test script:
---------------
setlocale(LC_ALL, 'C');
var_dump(preg_match('
^\w+$u',
'Iñtërnâtiônà lizætiøn'));
Expected result:
----------------
I'd expected the results of the regex to be the same cross-version.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76526&edit=1