|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
43 - 16 = ?
Subscribe to this entry?

 [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
 [2023-09-29 12:15 UTC] tannaowens6 at googlemail dot com
Thanks for the information. (
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 28 20:01:31 2024 UTC