|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #73061 FREQ: compiled regexps: opcache cache them maybe?
Submitted: 2016-09-10 08:39 UTC Modified: 2016-09-10 14:24 UTC
Avg. Score:2.3 ± 1.9
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:-1 (-100.0%)
From: alex at alex-at dot ru Assigned:
Status: Open Package: PCRE related
PHP Version: Next Minor Version OS:
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: alex at alex-at dot ru
New email:
PHP Version: OS:


 [2016-09-10 08:39 UTC] alex at alex-at dot ru
PHP regexp cache seems to be per-thread, and that's sometimes very inconvenient. 

Imagine like 100 RPS doing ~10 different regexes each time. If these could be precompiled and cached between threads, it all would be fine. But if it's per-thread, then it's like ~1000 compilations each second.

Maybe there can be a way to store compiled regexps inside the opcache cache?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-09-10 14:24 UTC]
-Package: *Regular Expressions +Package: PCRE related
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Mar 23 06:03:38 2023 UTC