Static analysis
Part of Testing is the static analysis that your IDE can perform, or that standalone analysis tools can perform.
Brent Roose of PHP Annotated discusses Static Analysis in this video about Generics in PHP
Static Analysis tools for PHP edit
Phan edit
see Phan
PHPStan edit
This is my favorite tool. See PHPStan