PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
This command searches through the /path/to/code directory for all files with a .php extension (adjust as necessary to match your own naming conventions; add another extension such as .inc by appending -o -name \*.inc to the find command) and passes them one at a time to PHP's CLI binary with -l to indicate lint mode. In this mode, the file is parsed but not executed, and any existing parse errors will be identified. The scripts stops execution if a parse error is encountered.
How can I do this on windows? I do have php accessible from the command line.
EDIT| I just want to do one file, not a directory.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
C:\Users\Scott>php -l c:\apache2\htdocs\bs\includes\php\cron\cron_hour.php
No syntax errors detected in c:\apache2\htdocs\bs\includes\php\cron\cron_hour.php
C:\Users\Scott>
I wonder why php_check_syntax() was removed.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.