On Apr 2, 2026, at 11:25 AM, Matthew Weier O'Phinney <[email protected]>
wrote:
>
> On Wed, Mar 11, 2026 at 10:56 AM Calvin Buckley <[email protected]> wrote:
> Based on the feedback I had from my proposal for function arguments in
> errors last week, I'd like to introduce an RFC for it. Please let me
> know what you think and please raise any possible issues.
>
> https://wiki.php.net/rfc/display_error_function_args
>
> Have you done any benchmarking on this? What is the performance impact when
> it is enabled versus disabled? That information will be useful if this passes
> so that users can understand not just the security impact of having this
> information reported in logs, but the performance impact.
>
> --
> Matthew Weier O'Phinney
> [email protected]
> https://mwop.net/
> he/him
FWIW, I actually did try running benchmark/benchmark.php. The difference is
pretty much margin of error (somehow fewer instructions in some cases?), but I
also don't expect to see much of any docrefs triggered in it either. For the
sake of completeness:
Without:
{
"Zend\/bench.php": {
"instructions": "1979721332"
},
"Zend\/bench.php JIT": {
"instructions": "589555739"
},
"Symfony Demo 2.2.3": {
"instructions": "87285017"
},
"Symfony Demo 2.2.3 JIT": {
"instructions": "90024058"
},
"Wordpress 6.2": {
"instructions": "244605957"
},
"Wordpress 6.2 JIT": {
"instructions": "211892436"
}
}
With:
{
"Zend\/bench.php": {
"instructions": "1979721328"
},
"Zend\/bench.php JIT": {
"instructions": "589555784"
},
"Symfony Demo 2.2.3": {
"instructions": "87285011"
},
"Symfony Demo 2.2.3 JIT": {
"instructions": "90023734"
},
"Wordpress 6.2": {
"instructions": "244606014"
},
"Wordpress 6.2 JIT": {
"instructions": "211892519"
}
}
You can try it yourself with this patch (set error_include_args as needed):
diff --git a/benchmark/benchmark.php b/benchmark/benchmark.php
index 0c2ac4c6010..6377c3ceb37 100644
--- a/benchmark/benchmark.php
+++ b/benchmark/benchmark.php
@@ -79,7 +79,8 @@ function runWordpress(bool $jit): array {
/* FIXME: It might be better to use a stable version of PHP for this
command because we can't
* easily alter the phar file */
runPhpCommand([
- '-d error_reporting=0',
+ '-d error_reporting=22527',
+ '-d error_include_args=1',
'wp-cli.phar',
'core',
'install',
@@ -122,6 +123,8 @@ function runValgrindPhpCgiCommand(
'--',
$phpCgi,
'-T' . ($warmup ? $warmup . ',' : '') . $repeat,
+ '-d error_reporting=22527',
+ '-d error_include_args=1',
'-d max_execution_time=0',
'-d opcache.enable=1',
'-d opcache.jit=' . ($jit ? 'tracing' : 'disable'),
I'm working on something that triggers a lot of docrefs in a hot loop, but I
also don't know how interesting that would be seeing as if you're getting
thousands of docref-triggered messages a second, your program probably has an
issue.