php.net |  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
3 + 46 = ?
Subscribe to this entry?

 
 [2018-06-25 09:59 UTC] 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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-06-25 10:01 UTC] nikic@php.net
-Status: Open +Status: Duplicate
 [2018-06-25 10:01 UTC] nikic@php.net
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: Thu Apr 25 04:01:38 2024 UTC