Free Tip on Verifying PHP Scripts sans Test Server

July 13th, 2007
Leroy LeeseLeroy is a Zend PHP Certified Engineer from Crestview FL. He has been computing for over two decades, drag-racing for 13 years and spent a year with a band as a guitarist Leroy LeeseWeb Programmer/DeveloperProgrammer

From your Uncle Leroy …

Use:

php -l *script_name*

..to test the syntax of your scripts.

Obviously, you want to unit test all code, but in a pinch, if some piece of code is difficult to setup the test environment, at least run a sytax check on it. Or use Eclipse with its syntax checking/highlighting turned on.

Comments are closed.