summaryrefslogtreecommitdiff
path: root/ext/pcre/tests
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2020-07-15 18:45:55 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2020-07-16 18:32:26 +0200
commit4659c12ae044154d112aec32d9dcb2ee65db7357 (patch)
tree0d9cd4c1c44453e9b62817dab7929603036c2a8c /ext/pcre/tests
parent03a98d9420a8ffa4b31c28e11792c161eaf49d82 (diff)
downloadphp-git-4659c12ae044154d112aec32d9dcb2ee65db7357.tar.gz
Fix #79846: 8c67c166996 broke simple regexp
We backport the respective upstream fix[1]. [1] <https://vcs.pcre.org/pcre2?view=revision&revision=1267>
Diffstat (limited to 'ext/pcre/tests')
-rw-r--r--ext/pcre/tests/bug79846.phpt17
1 files changed, 17 insertions, 0 deletions
diff --git a/ext/pcre/tests/bug79846.phpt b/ext/pcre/tests/bug79846.phpt
new file mode 100644
index 0000000000..b995c38794
--- /dev/null
+++ b/ext/pcre/tests/bug79846.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #79846 (8c67c166996 broke simple regexp)
+--FILE--
+<?php
+$item = "component_phase_1";
+preg_match("/([a-z]+_[a-z]+_*[a-z]+)_?(\d+)?/", $item, $match);
+var_dump($match);
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ string(17) "component_phase_1"
+ [1]=>
+ string(15) "component_phase"
+ [2]=>
+ string(1) "1"
+}