Skip to content

Instantly share code, notes, and snippets.

@l3dlp
Last active November 29, 2018 09:46
Show Gist options
  • Save l3dlp/11658dcef365e5e33f0c7d366ed00047 to your computer and use it in GitHub Desktop.
Save l3dlp/11658dcef365e5e33f0c7d366ed00047 to your computer and use it in GitHub Desktop.
“/bin/phpcheck“ - quickly check PHP syntax globally - “phpcheck -v“ = verbose mode
#!/bin/bash
if [ "$1" = "-v" ]; then
find . -name "*.php" -exec php -l {} \;
else
find . -name "*.php" -exec php -l {} \; | grep -v "No syntax errors detected in "
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment