Yes, syntax errors can be checked that way (though it is not handy, because you have to access the page).
However simple stuff like whether $user->getName() is allowed (meaning does the class of which $user is an instance has a function getName). For this you wont get an error until that line of code is actually executed.
I myself am thinking about making such a tool as my final assignment for my study (Computing Science at the University of Nijmegen, the Netherlands). Can any of you tell me if such a tool (tool that does syntax and some semantic checks) is wanted by the community??
(If you have any usefull thoughts on this mail me at: bramhaze@sci.kun.nl)