Maybe if it's a video decoder that uses special video decoding instructions. For real world code, though, a good JIT is going to make most code very fast, and you will actually be able to maintain it. I don't think Java is any harder to maintain than PHP, but it runs much faster. (I think Perl and Python are much easier to maintain, however, so if that was what we were arguing about, then it would make sense. PHP is objectively the worst "P" language.)
You're missing my point so completely that it becomes a fine example of why engineers make poor businessmen.
The best business solution is the one that accomplishes the task at hand with the least resources. By that metric, PHP is far superior to Java, regardless of the technical merits at hand.
It costs less to hire an army of PHP devs and a small team to optimize PHP, than it does to hire an army of Java developers.
The difference in pay is around $20K. If you have 500 developers, that's a difference of $10 mil per year. Over the span of a decade, you're talking about over $100 million in savings.
As I said, Facebook is a business, not a pet project or an academic exercise. Decisions on which platform to use and keep are made based on dollars and cents ... not on which is more elegant or technically superior.
> It costs less to hire an army of PHP devs and a small team to optimize PHP, than it does to hire an army of Java developers.
Is that what Facebook is doing? Everything I've read about interviewing and getting hired at Facebook leads me to believe that they are not hiring an army of cheap PHP developers.