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 this is not your bug, you can add a comment by following this link.
If this is your bug, but 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

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 22:01:26 2024 UTC