go to bug id or search bugs for
A backreference to a branch reset group works as expected in PHP 5 but not in PHP 7.
$string = '--';
$doesNotMatchInPhp7 = '/(?|(---)|(-))\1$/';
$matchesInPhp7 = '/(?|(-)|(---))\1$/';
Add a Patch
Add a Pull Request
Adjusted a summary.
Works without JIT. https://3v4l.org/7dAic
Looks like this got fixed in PHP 7.3 due to the update to PCRE2.
It looks like there also was a new PCRE1 release recently, but I'm not seeing this issue in the changelog.