Yes, with enough engineering effort you can move mountains, but if performance is critical and you don't have a legacy code base like Facebook does, reaching for the php hammer is insanity.
The real reason why performance isn't a big downside with php is that it usually just doesn't matter.
If a php implementation can service 100 req/s, and a Java implementation (an ad absurdum) 100,000 req/s, and your site peaks at 5 req/s, either is just fine.
In other words, "You're probably not Pintrest".