Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130587 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id F3D001A00BC for ; Tue, 7 Apr 2026 15:23:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1775575412; bh=R6g7sw11REUqed+tTsUXOgcac4eF9yeqQmA7BZ0rdw0=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=IMXiHLGsttJmg7305msTIq6vBegJfGFp4hnrZ5N8zX4n5kAahgN/g5A07KTXH9qq/ bzBItw2dfc1Lj9xvCO3t/S9zuiGRfA/1Hla9ZFvoJzEG/hAbPtSPM5RS3gSmHXBgWv kBgAlUKJqp5ghW7QOG1m0VSyN6hpYInYOpzqjSZg6yjlp3BQqe2m2gVH2Qy8RZPvmh VUMLoOgaPv9MQIU3bZFETdcwa0tECXKygUJU9yDYV94OUsRnAUGRc7Wi6JxHgWyRIB Uc0mevgz8vVtu7p/R4aVCudZgijeAegJk7MGDyisOzJHU0g0SKokl+5IhEq4Ca1LTo J0dsm3fTrDhXg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CDB6B1801D8 for ; Tue, 7 Apr 2026 15:23:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,DMARC_MISSING, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from supercat.cmpct.info (supercat.cmpct.info [71.19.146.230]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 7 Apr 2026 15:23:31 +0000 (UTC) Received: from smtpclient.apple (fctnnbsc38w-142-134-101-31.dhcp-dynamic.fibreop.nb.bellaliant.net [142.134.101.31]) by supercat.cmpct.info (Postfix) with ESMTPSA id C8EC843205; Tue, 07 Apr 2026 15:23:23 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.500.181\)) Subject: Re: [PHP-DEV] [RFC] Display Function Arguments in Errors In-Reply-To: Date: Tue, 7 Apr 2026 12:23:10 -0300 Cc: PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <00628FD8-53DE-4301-A23E-42F7C54E92F6@cmpct.info> References: <939CFA28-A6FF-433F-85A0-B83345CEF4A6@cmpct.info> To: Matthew Weier O'Phinney X-Mailer: Apple Mail (2.3864.500.181) From: calvin@cmpct.info (Calvin Buckley) On Apr 2, 2026, at 11:25=E2=80=AFAM, Matthew Weier O'Phinney = wrote: >=20 > On Wed, Mar 11, 2026 at 10:56=E2=80=AFAM Calvin Buckley = 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. >=20 > https://wiki.php.net/rfc/display_error_function_args >=20 > 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. >=20 > --=20 > Matthew Weier O'Phinney > mweierophinney@gmail.com > 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=3D0', + '-d error_reporting=3D22527', + '-d error_include_args=3D1', 'wp-cli.phar', 'core', 'install', @@ -122,6 +123,8 @@ function runValgrindPhpCgiCommand( '--', $phpCgi, '-T' . ($warmup ? $warmup . ',' : '') . $repeat, + '-d error_reporting=3D22527', + '-d error_include_args=3D1', '-d max_execution_time=3D0', '-d opcache.enable=3D1', '-d opcache.jit=3D' . ($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.