Bug #79175 [NEW]: Different results between 7.3 and 7.4 when using \p{N} character property

From: Date: Mon, 27 Jan 2020 15:20:38 +0000
Subject: Bug #79175 [NEW]: Different results between 7.3 and 7.4 when using \p{N} character property
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-225154@lists.php.net to get a copy of this message
From: php at spamscan dot biz Operating system: Debian Linux PHP version: 7.4.2 Package: PCRE related Bug Type: Bug Bug description:Different results between 7.3 and 7.4 when using \p{N} character property Description: ------------ When using preg_match() to check against PCRE character properties, using different character properties, where one is \p{N}, the match fails. I've provided a short sample script with this bug report. A more thorough script that shows that the problem only occurs if \p{N} is combined with other character properties can be found here: https://3v4l.org/XFEue $> /opt/php/bin/php --info|grep configure Configure Command => './configure' '--prefix=/opt/php' '--exec-prefix=/opt/php' '--with-mysqli=mysqlnd' '--with-pear' '--enable-gd' '--with-freetype' '--with-zlib-dir=/usr/lib' '--with-config-file-path=/etc/' '--with-jpeg' '--with-openssl' '--with-curl' '--enable-mbstring' '--with-zip' '--enable-sockets' '--enable-phar' '--enable-pcntl' '--enable-intl' '--without-sqlite3' '--without-pdo-sqlite' It seems that this is not an PCRE problem. I've tested the regexp with PCRE2 v.10.33 (the one that comes bundled with php 7.4.2): $> ./pcre2test PCRE2 version 10.33 2019-04-16 re> /[\p{Latin}\p{N}]+/ data> Text1234567890Text 0: Text1234567890Text Test script: --------------- <?php $string = 'Text1234567890Text'; print_r(preg_match('/[\p{Latin}\p{N}]+/u', $string, $m)); echo "\n---\n"; print_r($m); Expected result: ---------------- excpected result (php version 7.3) $> php --version PHP 7.3.12 (cli) (built: Nov 28 2019 10:53:41) ( NTS ) test script output: 1 --- Array ( [0] => Text1234567890Text ) Actual result: -------------- actual result (php 7.4) $> php --version PHP 7.4.2 (cli) (built: Jan 27 2020 14:05:08) ( NTS ) test script output: 1 --- Array ( [0] => Text ) -- Edit bug report at https://bugs.php.net/bug.php?id=79175&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79175&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79175&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79175&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79175&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79175&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79175&r=support Expected behavior: https://bugs.php.net/fix.php?id=79175&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79175&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79175&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79175&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79175&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79175&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79175&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79175&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79175&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79175&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79175&r=mysqlcfg

« previous php.bugs (#225154) next »