Skip to content

Instantly share code, notes, and snippets.

@twisty
Last active April 4, 2021 16:55
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save twisty/747668 to your computer and use it in GitHub Desktop.
Save twisty/747668 to your computer and use it in GitHub Desktop.
Check for PHP syntax errors for multiple files in a set of folders using PHP's "lint" option.

Syntax check php files in folders:

find ./foo ./bar \( -name "*.php" -or -name "*.phtml" \) -print0 | xargs -0 -n 1 php -l
@acro5piano
Copy link

Thanks!
I add -P8 and parallelly check PHP syntax on CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment