Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130678 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 8B9C41A00BC for ; Tue, 21 Apr 2026 09:33:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1776764037; bh=n8j2m56a4n8+U1KXxUw8aZ6MUnm1l7FP4757oUbAQfc=; h=From:Subject:Date:References:To:In-Reply-To:From; b=DB/LY11iA71M8/+5YKRwBxGVBntR+RVHCa39x4fWBQiRyACDdovaTMJY4fR+DmlQU mN+9skd1VD8aD6Z/weLt2KcOm2PmJPYpTop9OuUBjfGwrv76CZPoepjw4EqzmVIjd7 Tm5H810TBiAI5/eOjE4bEcpTNKQJATUV33LqkSjdxgifKP2RT0VJubawuXVlGvuKMm bMpZ4g3MaQIfXgju9Kks54vd6DF4WhBa8CKqJI/ce7JB7fIPVXD3A7ffIXuSfl+dbG doKf8GG3ojvJvxGGUmBsH4/PHBZejj2c9W6Z33sSc/3LuItaqsxswyWxhfXDsYN3Iw sCXoFBC+28+Bw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 70DD3180086 for ; Tue, 21 Apr 2026 09:33:51 +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.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail.gna.ch (darkcity.gna.ch [84.234.28.114]) (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, 21 Apr 2026 09:33:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.gna.ch (Postfix) with ESMTP id 03DAE2380A4D for ; Tue, 21 Apr 2026 11:33:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cschneid.com; s=default; t=1776764023; bh=n8j2m56a4n8+U1KXxUw8aZ6MUnm1l7FP4757oUbAQfc=; h=From:Subject:Date:References:To:In-Reply-To; b=gwJ/9gpEKKinaV5rudziLhXEjVdgd5HbY4V57WFDbiC3MCR6Ix/hg2qlGKfy/cGcH zmeNT0ecX2wf3XvVGKdP4RAiAsajQsns5V+ESHDoAN1hj9antqnfDJZMOqn0PU3NAx M+pdpjGDMC6dtuho7LqgWCMPzqfohM5z/ZDhIZWM= X-Virus-Scanned: amavis at gna.ch Received: from mail.gna.ch ([127.0.0.1]) by localhost (mail.gna.ch [127.0.0.1]) (amavis, port 10024) with ESMTP id uT1IRMGVlQ0x for ; Tue, 21 Apr 2026 11:33:41 +0200 (CEST) Received: from smtpclient.apple (unknown [IPv6:2a02:1210:2e2d:4d00:60ed:93a:5413:8661]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail.gna.ch (Postfix) with ESMTPSA id C33A823800E3 for ; Tue, 21 Apr 2026 11:33:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cschneid.com; s=default; t=1776764021; bh=n8j2m56a4n8+U1KXxUw8aZ6MUnm1l7FP4757oUbAQfc=; h=From:Subject:Date:References:To:In-Reply-To; b=k5QTJiVE9ey8157m0kqBsK7OzIvvJzgqX1NUvy0k+fOZzWvJQzAbsK6dZrURbTBBi u6vo+okv/EF/KgA8Z8sBypT8rikqoHHLguBhsm2IU3nRJGMPV9Nncul1bl8C9xHJ5S O67DR+9dCE4VaMArIzNJZGOBSvQJy1fVFJf5Rz5Q= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable 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] DocComments for internal functions Date: Tue, 21 Apr 2026 11:33:41 +0200 References: <2FGg02j2pKAcV7nu_mLBtetGMhhax9Ernyly_rH2jDaWzNUSlWMk7pYf4mEq9QIbuBj4tgxA9xLlTEnwPVqmxSTw558yTPNrEsk53G63xtQ=@gpb.moe> <30448463-1ABD-4005-89CC-3F558C7FE9B2@cschneid.com> To: internals@lists.php.net In-Reply-To: Message-ID: X-Mailer: Apple Mail (2.3864.500.181) From: cschneid@cschneid.com (Christian Schneider) Am 10.04.2026 um 23:47 schrieb Christian Schneider = : > Am 10.04.2026 um 17:40 schrieb Derick Rethans : >> On 10 April 2026 15:21:34 BST, Christian Schneider = wrote: >>> Am 10.04.2026 um 12:54 schrieb Gina P. Banyard : >>>> On Thursday, 9 April 2026 at 14:33, Christian Schneider = wrote: >>>>> The implementation can be examined at >>>>> = https://github.com/php/php-src/compare/master...chschneider:php-src:intern= al-functions-doccomments >>>>=20 >>>> I am not *fully* convinced that we should add DocComments for = internal parameters/functions/classes/constants, as this feels like a = lot of complexity. >>>=20 >>> What kind of complexity are you thinking about? Code-wise? = Integration into the build process? >>=20 >> I'm wondering how much this does to increase the size of the PHP = compiled binaries. >=20 > On my machine it adds about 2M (7%) as the sapi/cli/php binary = increases from ~28M to ~30M for a build with default ./configure and > CFLAGS=3D"-O3 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64" >=20 > I would assume this is mostly in a read-only data section and hence = shareable between processes. I checked again for more extensions (end hence more doc comments) = enabled and surprisingly the difference was not as big as I first = reported. Here are the configure options I used: CFLAGS=3D'-O3 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64' \ CXXFLAGS=3D'-O3 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64' \ CPPFLAGS=3D'-O3 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64' \ './configure' \ '--enable-bcmath' \ '--enable-debug=3Dno' \ '--enable-exif' \ '--enable-intl' \ '--enable-pcntl' \ '--enable-soap' \ '--with-zip' \ '--enable-mbstring' \ '--with-curl' \ '--with-freetype' \ '--enable-gd' \ '--with-gettext' \ '--with-iconv' \ '--with-jpeg' \ '--with-webp' \ '--with-ldap' \ '--with-mysqli' \ '--with-openssl' \ '--with-pear' \ '--with-pgsql' \ '--with-pdo-mysql' \ '--with-zlib' \ Result: a) No file size difference!? Not 100% what that means: $ ls -l php.{master,doccomments} -rwxrwxr-x 1 cschneid trusted 32287008 Apr 21 10:55 php.doccomments -rwxrwxr-x 1 cschneid trusted 32287008 Apr 21 10:55 php.master b) About 500k difference in the .rodata segment: $ diff -u <(eu-size -d -A php.master) <(eu-size -d -A php.doccomments) -php.master: +php.doccomments: -.text 8629549 6322432 +.text 8629293 6322432 -.rodata 14933412 18874368 +.rodata 15459140 18874368 -.eh_frame_hdr 163060 33807780 +.eh_frame_hdr 163052 34333508 -.eh_frame 955472 33970840 +.eh_frame 955424 34496560 -Total 26223763 +Total 26749179 =20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Now so far I got no input in how to proceed: Should I create an RFC or = directly a PR? I see the following possible outcomes: 1) The whole idea is rejected by the maintainers / community 2) The foundation to generate PHP binaries with doc comments for = internal functions is added and documented but not enabled 3) In addition to 2) before each release the doc comments are generated = / updated from the current doc-en repository (and committed?) Adding doc comments to the source currently requires calling ./build/add_doccomments.php && ./build/gen_stub.php --force The current implementation can be examined at = https://github.com/php/php-src/compare/master...chschneider:php-src:intern= al-func-doccomments I'd appreciate any thoughts, - Chris