Am 24.02.2026 um 21:53 schrieb Christian Schneider <[email protected]>:
> Am 24.02.2026 um 20:13 schrieb Larry Garfield <[email protected]>:
>> 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.
>
> 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 changed the example to use the standard docblock-before variant and added a
separate example to explain the option to put the comments behind the parameter
definition:
https://wiki.php.net/rfc/parameter-doccomments#example
Regards,
- Chris