@phan-assert-if-false
The @phan-assert-if-false tag asserts the given type for an argument or variable when the function returns false. It belongs to the same assertion family as @phan-assert and its counterpart @phan-assert-if-true.
"@phan-assert-if-false" <Type> <Variable> [ <Description> ]
Parsing a @phan-assert-if-false tag produces an AssertIfFalseTag instance, carrying the asserted $type and $variable alongside the $name and optional $description every Tag already provides.
final class AssertIfFalseTag extends TypedVariableTag {}
The same AssertIfFalseTag is produced by @psalm-assert-if-false and @phpstan-assert-if-false, which restate the same assertion for their respective tools.
Defined by Phan; see the "Assertions" section of Phan's Annotating Your Source Code wiki.
08 July 2026