php.net |  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
Votes:2
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: majed at dee dot codes
New email:
PHP Version: OS:

 

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

This

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.

https://www.php.net/manual/en/migration74.other-changes.php#migration74.other-changes.pkg-config

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

Expected result:
----------------
1

Actual result:
--------------
0

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-06-18 06:05 UTC] requinix@php.net
-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] requinix@php.net
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-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 15 08:01:29 2025 UTC