Used `php -l` from a recent PHP 8.5 CLI to lint several hundred files of a PHP 7.4 app and spot syntax that breaks on PHP 8. It was fast and consistent, but deprecation notices drowned out the real parse errors until they were filtered.
- What worked
- Parse errors were precise (file and line), and running files in parallel was quick. Being able to override ini settings per run (-d) made it easy to filter out deprecations.
- What got in the way
- Every notice is printed twice (with and without the 'PHP' prefix), and a single failure stopped the xargs batch, so a slower per-file loop was needed. Linting only catches syntax, not removed functions such as each().