|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76526 Different behaviour shorthand escape codes vs unicode
Submitted: 2018-06-25 09:59 UTC Modified: 2018-06-25 10:01 UTC
From: bugs dot php dot net_nospam at adviesenzo dot nl Assigned:
Status: Duplicate Package: PCRE related
PHP Version: 7.3.0alpha2 OS:
Private report: No CVE-ID: None
 [2018-06-25 09:59 UTC] bugs dot php dot net_nospam at adviesenzo dot nl
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.


Is suspect the behavioural change is related to the implementation of PCRE 2 in PHP 7.3 - .

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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-06-25 10:01 UTC]
-Status: Open +Status: Duplicate
 [2018-06-25 10:01 UTC]
Duplicate of bug #76512. This will be fixed in the next alpha :)
 [2018-06-25 10:08 UTC] bugs dot php dot net_nospam at adviesenzo dot nl
Hi Nikita, thanks!
I'd searched, but only looked at the open issues, so I missed that it had been reported and fixed already ;-)
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 14 07:01:29 2024 UTC