PHP TypeLang Help

@override

The @override tag marks a method as intentionally overriding a definition inherited from a parent class. It mirrors PHP 8.3's native #[\Override] attribute, and covers the cases the attribute cannot: codebases that still support older PHP versions, and interfaces or traits, where the native attribute has no effect.

"@override" [ <Description> ]

Parsing an @override tag produces an OverrideTag instance:

final class OverrideTag extends FlagTag {}

Being a pure marker, it adds nothing beyond the $name and optional $description every Tag already carries.

It resembles PHP 8.3's native #[\Override] attribute — and covers the cases that attribute can't, such as codebases still supporting older PHP versions, or interfaces and traits, where the native attribute has no effect — but that attribute is a distinct language feature, not this tag's origin. Phan has its own, unrelated @phan-override. This tag is this library's own convention.

05 July 2026