Skip to content

Instantly share code, notes, and snippets.

@mercuriete
Created April 2, 2019 14:17
Show Gist options
  • Save mercuriete/eb71f858dce5bb6a18088e6cf3a73957 to your computer and use it in GitHub Desktop.
Save mercuriete/eb71f858dce5bb6a18088e6cf3a73957 to your computer and use it in GitHub Desktop.
php recursive syntax check
#!/bin/bash
#search recursive and syntax check
find . -type f -name '*.php' -not -path "./vendor/*" -exec php -l {} \;
@mercuriete
Copy link
Author

I thought I was the first implementing that...
but in reality a quick search on internet show this blog:

https://www.electrictoolbox.com/php-command-line-syntax-checking/

Only to give credit and say that I was not the first doing this.

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