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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2020 The PHP Group
All rights reserved.
Last updated: Sun Nov 29 13:01:23 2020 UTC