Bug #74612 [Opn]: A backreference to a branch reset group

From: Date: Thu, 18 May 2017 16:05:22 +0000
Subject: Bug #74612 [Opn]: A backreference to a branch reset group
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-209188@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74612&edit=1 ID: 74612 Updated by: requinix@php.net Reported by: oleynikovny at mail dot ru Summary: A backreference to a branch reset group Status: Open Type: Bug Package: PCRE related Operating System: GNU/Linux PHP Version: 7.1.5 Block user comment: N Private report: N New Comment: https://3v4l.org/J6L3u Works without JIT. https://3v4l.org/7dAic Upstream bug? Previous Comments: ------------------------------------------------------------------------ [2017-05-18 15:02:11] oleynikovny at mail dot ru Adjusted a summary. ------------------------------------------------------------------------ [2017-05-18 14:59:54] oleynikovny at mail dot ru Adjusted a summary. ------------------------------------------------------------------------ [2017-05-18 14:58:06] oleynikovny at mail dot ru Description: ------------ A backreference to a branch reset group works as expected in PHP 5 but not in PHP 7. Test script: --------------- <?php $string = '--'; $doesNotMatchInPhp7 = '/(?|(---)|(-))\1$/'; $matchesInPhp7 = '/(?|(-)|(---))\1$/'; var_dump(preg_match($doesNotMatchInPhp7, $string)); var_dump(preg_match($matchesInPhp7, $string)); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74612&edit=1

« previous php.bugs (#209188) next »