|  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
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.
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
 [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: Sat May 18 01:01:33 2024 UTC