Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130163 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 017331A00BC for ; Tue, 24 Feb 2026 20:54:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1771966455; bh=rUfk6vGkLypCleX9Gyf3L+wVjKOhOWELm2YNqZR7YtY=; h=From:Subject:Date:References:To:In-Reply-To:From; b=SlKdv1KYfTH2ib/nZQRJTI/ZbXsG9tLwHN6QFJSIrk7cuxFo+0Jab7Iby9yb8TRBt OivkxlMtdIKLmLwOQQsSnW0FmZ4Xa2qf/g21pcgdWn5fwHL5AN+y/3xbY7WYHJBTBs cMdK/Dzt8B1HhziSswuOsLJNGLasuWN0ljgbRYt6hwLLLMMZJ5Tuc3rcAl7oK9lJxm 5ahZ1pR/byUtwxQlj9UCPGf8J0AXLVx8E/8jECyx00/m0KFTBsAAu6hs5OS+s8hRiw TEkepnv1m4Ns+oqMIhIHHZyQSU6D6YrEoXPF8T+aslLbqRg3+CKfHFQs6iG51h7hN2 ZwO/OPV4Z9nkg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B28AA18055F for ; Tue, 24 Feb 2026 20:54:04 +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=2.3 required=5.0 tests=BAYES_50,DKIM_INVALID, DKIM_SIGNED,DMARC_NONE,KHOP_HELO_FCRDNS,SPF_HELO_NONE,T_SPF_TEMPERROR 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, 24 Feb 2026 20:54:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.gna.ch (Postfix) with ESMTP id 93C5D2380A41 for ; Tue, 24 Feb 2026 21:53:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cschneid.com; s=default; t=1771966437; bh=rUfk6vGkLypCleX9Gyf3L+wVjKOhOWELm2YNqZR7YtY=; h=From:Subject:Date:References:To:In-Reply-To; b=hUxfhOFY9D1anfb3GwNZEwOCwhwsz6F2CpAm77wsto9NNRvC2wh6vtC97N4juKtIU E8YvgyLvzCB1dILLodb9poFNDLAbVfkprWgtUV7ls/AI8w9eiLdWxl80PLO2NqiTrP cBMAZ+oAiEIbUP2G0ikBREvApXyEn8bFVNxTYIRo= X-Virus-Scanned: amavisd-new at gna.ch Received: from mail.gna.ch ([127.0.0.1]) by localhost (mail.gna.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 83OcwTjkZmjl for ; Tue, 24 Feb 2026 21:53:55 +0100 (CET) Received: from smtpclient.apple (unknown [IPv6:2a02:1210:2e2d:4d00:48bf:3ca1:c1ef:767e]) (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 9208623800EE for ; Tue, 24 Feb 2026 21:53:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cschneid.com; s=default; t=1771966435; bh=rUfk6vGkLypCleX9Gyf3L+wVjKOhOWELm2YNqZR7YtY=; h=From:Subject:Date:References:To:In-Reply-To; b=pxCSbBZMZIvhRKkyOcVJznWpmfXuyUT4RiAf45+ABCVRgRRQaSXrYXBcadNca+zdt uUPltEan9y9EU3crzr0uJmRxspcxhOzaBEmt9Tg40xvhhuzbWCIIVKoHU5Tj11GmWU EvF0kOLM8NXOFZRVUNskap1ZmlaKPVXO5WPAdhMw= 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.400.21\)) Subject: Re: [PHP-DEV] [RFC] DocComments For Function Parameters Date: Tue, 24 Feb 2026 21:53:55 +0100 References: <24229A82-F5BF-48F2-9E6C-FE45A99FB9E9@cschneid.com> <65C41C15-74C2-4A25-ABA7-056D612DF366@cschneid.com> <5706932f-e005-41cc-8bc5-1fb1fa4e344c@app.fastmail.com> To: php internals In-Reply-To: <5706932f-e005-41cc-8bc5-1fb1fa4e344c@app.fastmail.com> Message-ID: <4BCFFC1C-7F82-40FF-ADEE-E8161C05047D@cschneid.com> X-Mailer: Apple Mail (2.3864.400.21) From: cschneid@cschneid.com (Christian Schneider) Am 24.02.2026 um 20:13 schrieb Larry Garfield : > 1. As Matthew said, putting the doc comment after the parameter is = inconsistent. I've... never actually seen someone do that. I have seen = people put doc comments on the line before a parameter (which I then had = to move to the function docblock, which was annoying). Every other = docblock-able construct has the docblock as a prefix, not suffix. It = should be a prefix here as well. =20 Just to clarify: You can write it before, in the middle or after the = parameter, just like you can write it before or in the middle of = properties. The proposal allows pre, middle and post styles. I understand that putting it after the parameter is not to everybody's = taste but is the fact that this proposal *allows* it to be after a = deal-breaker? If people feel really strongly about not allowing this (but why didn't = anyone ever complain about in-the-middle doccomments for properties etc. = so far?) then I could adapt the proposal. I'm not yet convinced of the = harm though. > 2. I realize the existing getDocComment() implementations also use = string|false, but at what point are we going to accept that is a stupid = return type and use string|null instead? :-( (I realize it may not be = fixable here; I just want to whine about that design flaw propagating = even further.) I agree that anything|false is most of the time a mistake (as the = absence of a value is better expressed by null) but I doubt we should = change that for this single case only. If we want to change this then it = should be a proposal for a whole range of functions, or in this case at = least for getDocComment() in all Reflection classes. Regards, - Chris