Re: [RFC] DocComments For Function Parameters
| From: | Matthew Weier O'Phinney | Date: | Sat, 21 Feb 2026 18:41:22 +0000 |
| Subject: | Re: [RFC] DocComments For Function Parameters | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-130122@lists.php.net to get a copy of this message | ||
On Sat, Feb 21, 2026, 11:52 AM Christian Schneider <cschneid@cschneid.com>
wrote:
> I would like to introduce DocComment support for function parameters:
>
> https://wiki.php.net/rfc/parameter-doccomments
>
>
I've been wanting this for nearly 20 years!
Questions:
- Would it also support the comment appearing before the parameter?
/** This is the description */
string $message,
- If so, what would be the behavior of the engine if a docblock was present
in both positions, like:
/** This is the description */
$message
/** But what about this? */,
Generally, docblocks precede the item being documented, so if only one form
were allowed, for consistency, that should be the form supported.
--
Matthew Weier O'Phinney
mweierophinney@gmail.com
https://mwop.net/
he/him
>