Every language with a non-trivial number of users tends to have a couple (or maybe couple dozen) different static analyzers of varying quality. This is one of the PHP static analyzers.
Yes, except those static analyzers are the compilers for those languages and the rules that define crappy programs are in the type system, not in ad-hoc specifications of patterns to identify for static analyzers...
While some compilers do ship with static analysis components (e.g. Clang), static analyzers are usually distinct from compilers. Doesn't matter it for static or dynamic languages.
The first linting tool was made in 1979 for C programs and I remember ads for PC-Lint in the back of programming magazines all the time growing up. Static analysis tools catch more than just datatype errors. They look for patterns that identity common logic errors as well. PC-Lint used to cost a couple hundred dollars, and people were plenty willing to pay that much for extra peace of mind.
It was able to detect a surprising number of logic errors, probably just caused by as tired programmer, or copy-pasting too quickly. For example in the function below, it was able to spot that the last 2 clauses of that comparison are identical. The programmer meant to use a '+' instead of '-' in the last one. I don't think you could have a type system that would disallow this logic error. (If it is possible, please prove me wrong, because that sounds awesome).
static bool PositionIsInside(....)
{
return
Position.X >= Control.Center.X - BoxSize.X * 0.5f &&
Position.X <= Control.Center.X + BoxSize.X * 0.5f &&
Position.Y >= Control.Center.Y - BoxSize.Y * 0.5f &&
Position.Y >= Control.Center.Y - BoxSize.Y * 0.5f;
}
[0] http://www.viva64.com/en/b/0249/This is also why Facebook has spent so much time and effort on things like HHVM and Hack.
* Would you hire somebody who wasn't able to learn a new language in a reasonable amount of time?
* Would you let somebody who just started with PHP (by virtue of it being an easy language to start with) work on your backend?
A good developer will learn a new language in a reasonable amount of time and will be able to be productive and write good code in it.
A PHP-only (or X-only for that matter) developer is, by the definition above, not a good developer.
So why restrict oneself to some random pool of X-only people?
FWIW, they have released cool open source projects on Haskell and ocaml, so it's not like they've never considered any alternatives.
I also have a small suspicion that they wanted to stick to their roots a bit. But thats just me.
In many cases the latter forces you to compromises in what you pick and the first one in compromises when you pick it.
I fully understand when people try to make work what they have.
Eg PHP by itself is a very fast powerful language. The tooling and several aspects (dynamic type etc) are exhausting for larger code bases but this is something which people inhouse can solve without requesting the full company to switch.
Static analysis has nothing to do with typing. Static analysis is about interpreted code, where you lack the luxury of compiler warnings.