php -l runs a simple check

 

http://www.icosaedro.it/phplint/ - written in M2 of all things. But seems to work well. Although I’ve only tried the online version