Free Tip on Verifying PHP Scripts sans Test Server
July 13th, 2007Leroy Leese
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.