Scripts & Templates

PHPStan

A tool that reads your PHP code and finds bugs before you even run it.

Pass it on: WhatsApp
Added
Oct 31, 2026
Source
phpstan.org

PHPStan checks your code for mistakes like calling methods that don't exist, wrong types or variables that might be null. It catches a lot of the bugs that usually only show up in front of customers.

What you can do with it

  • Scan a whole project for errors in seconds
  • Start at a low strictness level and turn it up over time
  • Run it automatically before every deploy

Good to know

Install it with Composer. Older projects will show lots of warnings at first, so start at level 0 and work up.

Was this helpful?