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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bugs dot php dot net_nospam at adviesenzo dot nl
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Sat Nov 23 11:01:28 2024 UTC