@param-out
The @param-out tag documents the type held by a by-reference parameter (&$arg) after the function or method has returned. A reference parameter's own @param describes what it accepts on the way in, but PHP lets a function overwrite a reference with a completely different, usually more specific, value on the way out — the classic example being a parameter that accepts ?string but is guaranteed to hold a non-null string once the call succeeds. Without a separate tag for the outgoing type, callers and analyzers are stuck assuming the same type applies in both directions.
Parsing a @param-out tag produces a TypedVariableTag instance exposing:
$type— the documentedTypeNodethe reference holds after the call.$variable— the parameter's name, without the leading$.
This is the same shape as @param, but describes the outgoing value of a reference parameter rather than the incoming one.
@param-out originated in Psalm and was later adopted by PHPStan; the bare spelling works in both. See PHPStan's coverage and Psalm's @param-out.