For finding syntax errors:

command line php can:
# do syntax check only with the “-l” switch
# specify alternate php-ini with the “-c ” option or use “-n” not to use a php.ini at all.

e.g.:

$ cat /tmp/t
$ php -ln /tmp/t
Parse error: parse error, unexpected T_ECHO, expecting ',' or ';' in /tmp/t on line 3
errors parsing /tmp/t