diff options
| author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-07-15 18:45:55 +0200 |
|---|---|---|
| committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-07-16 18:32:26 +0200 |
| commit | 4659c12ae044154d112aec32d9dcb2ee65db7357 (patch) | |
| tree | 0d9cd4c1c44453e9b62817dab7929603036c2a8c /ext/pcre/tests | |
| parent | 03a98d9420a8ffa4b31c28e11792c161eaf49d82 (diff) | |
| download | php-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.phpt | 17 |
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" +} |
