Menu

Error Identifiers

Every error reported by PHPStan is associated with an error identifier. The identifier is printed alongside each error in the analysis output:

PHPStan error output showing error identifiers

Error identifiers are also visible when browsing errors with PHPStan Pro.

Ignoring errors using identifiers #

Error identifiers can be used to ignore specific errors. Some errors are non-ignorable because they indicate code that would cause a crash or a fatal error at runtime.

You can ignore errors using inline comments in all PHP comment styles:

// @phpstan-ignore argument.type
$this->foo->doSomethingWithString(1);

You can also ignore errors in your configuration file using the identifier key:

parameters:
	ignoreErrors:
		-
			identifier: argument.type

Or with the identifiers key to ignore multiple identifiers at once:

parameters:
	ignoreErrors:
		-
			identifiers:
				- argument.type
				- argument.named

See the Ignoring Errors documentation for the full list of options.

Error identifier detail pages #

Each error identifier has its own detail page with information about why the error is reported, example code that triggers it, and examples of how to fix it.

Examples:

All error identifier groups #

Theme
A
© 2026 PHPStan s.r.o.