phpcheck
is a simple shell script written in Bash
that helps you to lint your .php
files in batch in order to check if there's any .php files with syntax errors.
- Unix-like OS
- Bash
- PHP
phpcheck can be installed globally by doing the following steps:
chmod +x phpcheck.sh
mv phpcheck.sh /usr/local/bin/phpcheck
Once phpcheck
is installed, one can simply execute something like:
phpcheck /dir/where/my/php/files/are/
This will lint all .php
files in the selected directory and it will outputs the ones with syntax errors.
If no argument is supplied, then working directory will be used by default.
You can also lint just a single file:
phpcheck myAwesomeFile.php
Found this useful and wan't to make it better? Please fork this repo and pull request!