Existence of classes used in instanceof, catch, typehints and other language constructs. PHP does not check this and just stays instead, rendering the surrounded code unused.
Existence and accessibility of called methods and functions. It also checks the number of passed arguments.
Whether a method returns the same type it declares to return.
Existence and visibility of accessed properties. It will also point out if a different type from the declared one is assigned to the property.
Correct number of parameters passed to sprintf/printf calls based on format strings.
Existence of variables while respecting scopes of branches and loops.
Useless casting like (string) ‘foo’ and strict comparisons (=== and !==) with different types as operands which always result in false.
The list is growing with every release. But it’s not the only thing that makes PHPStan useful.
Reminds me of my favorite Justice League quote (fictitious) Superman to Aquaman, “Go make me a tuna fish sandwich?” Do you really have to be root to make a sandwich?