Bug #76526 [NEW]: Different behaviour shorthand escape codes vs unicode
| From: | bugs dot php dot net_nospam at adviesenzo dot nl | Date: | Mon, 25 Jun 2018 09:59:55 +0000 |
| Subject: | Bug #76526 [NEW]: Different behaviour shorthand escape codes vs unicode | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-215963@lists.php.net to get a copy of this message | ||
From: bugs dot php dot net_nospam at adviesenzo dot nl
Operating system:
PHP version: 7.3.0alpha2
Package: PCRE related
Bug Type: Bug
Bug description:Different behaviour shorthand escape codes vs unicode
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 bug report at https://bugs.php.net/bug.php?id=76526&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76526&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76526&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76526&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=76526&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=76526&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=76526&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=76526&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=76526&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=76526&r=support
Expected behavior: https://bugs.php.net/fix.php?id=76526&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=76526&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=76526&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=76526&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76526&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=76526&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=76526&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=76526&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76526&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=76526&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=76526&r=mysqlcfg