Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130601 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 7FCDD1A00BC for ; Fri, 10 Apr 2026 14:21:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1775830916; bh=ehrvgKU754ThfR7P27f1z/q2H2PT0Ezmt4otGdKzVhg=; h=From:Subject:Date:References:To:In-Reply-To:From; b=QU7nMjBzTza/97kTMYjow2PQkAPcq1DU7TF6cbrbErgBmHeDvH8qjirpyO/uVCCQO UtyLTGAy6XJ9mq/wpnz5opn4Flw/9CgiaG7VVMdXPjavNOXvjC1lq+uEMrLXi4EYIO AhI1UyVeEBIBNci+am/k5atkmAdbw8+PuL4d4Mwf1iMGMsBe1sDsr07jtQ9J97ZD7B 9W1WJGJ9G/NaMpwR87TJneSe5useo6xSsUOUqZn3cca3BP1EmjUbrtChhuhmiUJySk 3DDY4LpVclkiltZggGpCZo6+P09YCvwgU9OhsiPQdQI5Gk5hQ6Ibpx+jRXU2noB1PW 0Jgg5OvfjPw8w== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C97F6180088 for ; Fri, 10 Apr 2026 14:21:48 +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 ; Fri, 10 Apr 2026 14:21:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.gna.ch (Postfix) with ESMTP id 8E0F32380A5B for ; Fri, 10 Apr 2026 16:21:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cschneid.com; s=default; t=1775830895; bh=ehrvgKU754ThfR7P27f1z/q2H2PT0Ezmt4otGdKzVhg=; h=From:Subject:Date:References:To:In-Reply-To; b=GmNQMvOr4e7U+P/+eC/eS1iTWpsNJs9pc0F5+4TILBZMzV82WYvvVHUnqB/u0kRRl phaJw9gxIO6cIpgjwCNpt9OhoCnO4WnQuYRAAZpljvcVAd0GnJD9MtnxdgOlRGZo3I q46ounYXMZv+3/FX+Ej6KWykJx8BVrZ+w11Jmyuw= 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 Ov5BDfmtfRgj for ; Fri, 10 Apr 2026 16:21:34 +0200 (CEST) Received: from smtpclient.apple (unknown [IPv6:2a02:1210:2e2d:4d00:e108:feda:879:c70]) (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 6674D2380A59 for ; Fri, 10 Apr 2026 16:21:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cschneid.com; s=default; t=1775830894; bh=ehrvgKU754ThfR7P27f1z/q2H2PT0Ezmt4otGdKzVhg=; h=From:Subject:Date:References:To:In-Reply-To; b=pE308diaIjbimcrCLAPsgSMKbabEzqtSimxWcmWYT0/K5ywZ0DahDkvcU22056IMK eF/YiRh6CumYzHo6EIS7DQAraJe9O9JXdUqZO78oTZaH69M0OTzJqU6tNauI+IGWdH VHzBptOISzPwlioHe0v2joC/dbRz52r3aPRDurhE= 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: Fri, 10 Apr 2026 16:21:34 +0200 References: <2FGg02j2pKAcV7nu_mLBtetGMhhax9Ernyly_rH2jDaWzNUSlWMk7pYf4mEq9QIbuBj4tgxA9xLlTEnwPVqmxSTw558yTPNrEsk53G63xtQ=@gpb.moe> To: PHP internals list In-Reply-To: <2FGg02j2pKAcV7nu_mLBtetGMhhax9Ernyly_rH2jDaWzNUSlWMk7pYf4mEq9QIbuBj4tgxA9xLlTEnwPVqmxSTw558yTPNrEsk53G63xtQ=@gpb.moe> Message-ID: <30448463-1ABD-4005-89CC-3F558C7FE9B2@cschneid.com> X-Mailer: Apple Mail (2.3864.500.181) From: cschneid@cschneid.com (Christian Schneider) 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. What kind of complexity are you thinking about? Code-wise? Integration = into the build process? The infrastructure in the code (zend_API and gen_stub.php) is almost = ready. Sure, my script in build/add_doccomments.php might have some rough edges = but I wouldn't consider it that complex either. It's like one screenful of code - at least for my not too big screen = size ;-) - for usage/option handling, one screen of documentation = parsing and one screen of adding/replacing them in the stub.php files. Side-note: The documentation parsing code has a very simplistic check = feature so see if all parameters have types and descriptions and it = might be interesting to expand on that but then it would belong in the = doc-en repository, not the php-src one. > However, I've been working for the last 2ish years on some tooling [1] = to improve the syncing of the manual from the stubs, and in the long run = being able to semi-automatically create the migration guide. >=20 > Considering that a large part of it is parsing the documentation and = the stubs into a common representation to be able to do diffs on them, = this might be useful if we somehow want to "augment" the stubs. It seem you are trying to do something more complicated than me (going = from stubs to documentation) but I think they are still somewhat = separate things even though they might both work on php-src and doc-en. My motivation for adding documentation for internal functions is based = eating my own dog food when using my minimalistic single-file LSP = written in PHP which uses Reflection to provide auto-completions and = documentation which can be found here: = https://github.com/chschneider/lsp_php Regards, - Chris