Skip to content

Tag reference

@phan-output-reference

The @phan-output-reference tag marks a by-reference argument as output-only — Phan’s own counterpart to @param-out.

Grammar

"@phan-output-reference" [ <Description> ]

Examples

An argument the function only writes into.
/**
* @param array $errors
* @phan-output-reference
*/
function validate(array $data, &$errors): bool

Names by platform

phan
@phan-output-reference

Parsing a @phan-output-reference tag produces a PhanOutputReferenceTag instance. Being a pure marker, it adds nothing beyond the $name and optional $description every Tag already carries.

final class PhanOutputReferenceTag extends FlagTag {}

Defined by Phan’s Annotating Your Source Code wiki.