For compiled languages like Java or C, compilation is at the forefront of testing your code. It handles misspellings and enforces interfaces. It has other neat fetures like Java's @Deprecated
and @Override
to mention a few.
Is there a tool which checks your code in similar fashion for interpreted languages like PHP or JavaScript?
I'm well aware that JS does not have interfaces, but many meta-information could be fed to the tool thru Javadoc style comments for example.