You're confusing traffic ("small and medium website" usually means a website with small to medium traffic), with the degree of business logic complication (simple website vs enterprise solution). In the second case performance is not the key factor.
For example Facebook is high traffic website, but it's not an enterprise app. On the other hand there are plethora of intranets based on Java application servers, that wouldn't be able to handle traffic of even midsize website.
Performance-wise PHP is not the best option, but it's not that bad either. Especially comparing with other dynamic languages. However, again, raw performance is not the most important factor. Creating high-traffic websites is more about optimizing for scalability on architectural level.
Why is PHP so despised by enterprise? There are few causes, first would be it's terrible security reputation. Second is that it perceived as a language for amateurs creating ugly, unmanageable HTML-PHP spaghetti code. That perception persist, even though there are mature MVC frameworks. I guess having PHP's original author argue that you don't need a framework doesn't help. Fact that these clueless amateurs with little to none programming skills call themselves "PHP programmers" doesn't help either. Third reason is that any experienced programmer will agree, that PHP is just badly designed as a language. You can clearly see that it was designed by a webmaster, while most modern dynamic languages were designed by post-grad academics specializing in compilers and language design.
And yes, in enterprise it's all about system integration, where PHP doesn't shine either. With enough effort you can create C modules. There is PHP-Java bridge, which is quite tedious to use. Beyond that you don't have much. Attempts to create Boost::PHP (integration with C++) have failed. PHP-clones running on JVM are far from being anything close to 100% compatibility with PHP (as a side note, there is no formal PHP language definition, the only reference is the default implementation).