Bug #76526 [Opn->Dup]: Different behaviour shorthand escape codes vs unicode
| From: | nikic@php.net | Date: | Mon, 25 Jun 2018 10:01:51 +0000 |
| Subject: | Bug #76526 [Opn->Dup]: Different behaviour shorthand escape codes vs unicode | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-215964@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
Updated by: nikic@php.net
Reported by: bugs dot php dot net_nospam at adviesenzo dot nl
Summary: Different behaviour shorthand escape codes vs
unicode
-Status: Open
+Status: Duplicate
Type: Bug
Package: PCRE related
PHP Version: 7.3.0alpha2
Block user comment: N
Private report: N
New Comment:
Duplicate of bug #76512. This will be fixed in the next alpha :)
Previous Comments:
------------------------------------------------------------------------
[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