Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

PCRE regular expressions with JIT enabled gives different result #11956

Closed
@antman3351

Description

@antman3351

Description

Hi,
The fallowing regexpreg_match( '/<(\w+)[\s\w\-]+>/', '<br><div>', $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:PCRE2Project/pcre2#261 (comment)

Code example:https://3v4l.org/189jh

Thanks,
Antonio

PHP Version

8.2.7

Operating System

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp