Bug #79846 [NEW]: 8c67c166996 broke simple regexp
From: sjon
Operating system: archLinux
PHP version: 8.0.0alpha2
Package: PCRE related
Bug Type: Bug
Bug description:8c67c166996 broke simple regexp
Description:
------------
I have bisected commit 8c67c166996ae1d6809f0beaf691836e37d6afc1 to fail
unexpectedly on a pretty simple regexp, see https://3v4l.org/2vTf0
pcre2test works fine implying a bug in PHP
Test script:
---------------
$item = "component_phase_1";
preg_match("/([a-z]+_[a-z]+_*[a-z]+)_?(\d+)?/", $item, $match);
var_dump($match);
Expected result:
----------------
array(3) {
[0]=>
string(17) "component_phase_1"
[1]=>
string(15) "component_phase"
[2]=>
string(1) "1"
}
Actual result:
--------------
array(0) {
}
--
Edit bug report at https://bugs.php.net/bug.php?id=79846&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79846&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79846&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79846&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79846&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79846&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79846&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79846&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79846&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79846&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79846&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79846&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79846&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79846&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79846&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79846&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79846&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79846&r=mysqlcfg
Thread (10 messages)
- sjon@php.net