[php-src] Issue #11956: PCRE regular expressions with JIT enabled gives different result

From: Date: Sun, 13 Aug 2023 14:25:59 +0000
Subject: [php-src] Issue #11956: PCRE regular expressions with JIT enabled gives different result
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-245170@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/11956 Author: antman3351 ### Description Hi, The fallowing regex preg_match( '/<(\w+)[\s\w\-]+ id="S44_i89ew">/', '<br><div id="S44_i89ew">', $matches ); in PHP >= 8.1 gives different results if PCRE JIT is enabled or not. ( Note, I tried to simplify the regex to isolate the problem, that's why it doesn't make much sense ). I had this problem with PHP 7.3 where I found a bug report that sated the problem was the PCRE library and not PHP. I've recently migrated the code the regex is used in to PHP 8.2 and found there's still an issue, so I tested it on 3v4l.org and it seems to be fixed in PHP <= 8.0 and broken in 8.1. I noted the issue on the PCRE2 github but the author doesn't think the issue is with any changes in the PCRE library: https://github.com/PCRE2Project/pcre2/issues/261#issuecomment-1674394381 Code example: https://3v4l.org/189jh Thanks, Antonio ### PHP Version 8.2.7 ### Operating System _No response_

« previous php.bugs (#245170) next »