|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79709 Regex does not match space with JIT enabled
Submitted: 2020-06-18 05:55 UTC Modified: 2020-06-18 06:05 UTC
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: majed at dee dot codes Assigned:
Status: Suspended Package: PCRE related
PHP Version: 7.4.7 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: majed at dee dot codes
New email:
PHP Version: OS:


 [2020-06-18 05:55 UTC] majed at dee dot codes


print_r(preg_match('/[\s\p{Arabic}]/u',' '));

Prints 1 in PHP7.3.11 but prints 0 in 7.4.7 . If that's is expected, it's not documented in the migration manual.

Test script:
print_r(preg_match('/[\s\p{Arabic}]/u',' '));

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-06-18 06:05 UTC]
-Summary: Space regex +Summary: Regex does not match space with JIT enabled -Status: Open +Status: Suspended -Package: *Regular Expressions +Package: PCRE related
 [2020-06-18 06:05 UTC]
Only happens in JIT mode. Disable that with the pcre.jit setting.

That makes this a bug in the upstream PCRE library. I'm suspending this until that is fixed.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Sep 27 04:01:24 2023 UTC