Free Tip on Verifying PHP Scripts sans Test Server
July 13th, 2007From 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.
Leroy is a Zend PHP Certified Engineer from Crestview FL. He has been computing nearly two decades, drag-racing for 12 years and spent a year with a band as a guitarist
