Lint PHP files in parallel

One of the quickest and minimal code quality checks in software development is a simple syntax check. In case of PHP we have php -l <path/to/file.php>, nothing smart, nothing fancy.

In case of check automation or continuous integration you even may use Phing task PhpLintTask – runs perfectly and fails build f someone occasionally commits code with syntax errors.

But if you have many files, many CPU cores and fast enough disk – you can lint your PHP files in parallel with PHP Parallel Lint. I’ve tried this tool today and it runs twice faster than standard Phing task using serial approach.

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.