Skip to content

Tag reference

@internal

The @internal tag marks an element as belonging to the internal workings of its own package rather than to its public API: consumers should not depend on it, since it may change or disappear without a deprecation notice. Used inline inside a description, it instead marks just the surrounding portion of text as meant only for the package’s own maintainers, letting documentation generators strip that portion from public-facing output while keeping the rest of the description intact.

Grammar

"@internal" [ <Description> ]
"@psalm-internal" [ <Description> ]

Examples

An entire method excluded from the public API.
/**
* @internal Used by the container to wire up lazy proxies.
*/
public function __setDependencies(array $dependencies): void
An inline note tucked inside an otherwise public description.
/**
* Formats the message body. {@internal
* Encoding is UTF-8 for now; revisit once
* transports negotiate charsets.}
*/
public function format(Message $message): string

Names by platform

psalm
@psalm-internal
standard
@internal

Parsing an @internal tag produces an InternalTag instance. Being a pure marker, it adds nothing beyond the $name and optional $description every Tag already carries.

final class InternalTag extends FlagTag {}

Defined by the PSR-19 draft PHPDoc Tags proposal and phpDocumentor’s tag reference.