Created
April 2, 2019 14:17
-
-
Save mercuriete/eb71f858dce5bb6a18088e6cf3a73957 to your computer and use it in GitHub Desktop.
php recursive syntax check
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#search recursive and syntax check | |
find . -type f -name '*.php' -not -path "./vendor/*" -exec php -l {} \; |
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
The same is archivable with:
find . -type f -name '*.php' -not -path "./vendor/*" | xargs -L 1 -P 8 php -l
But using 8 process in parallel.