Create High Performance Website By PHPJul 09, 2015
There has been a decent amount of chatter lately about benchmarking various frameworks and programming languages, and people often wonder how PHP stacks up. As the most widely used programming language on the web, PHP performance has a huge impact on the speed of the internet as a whole. While many people believe that PHP is slow, or that it’s not the right choice for the enterprise for performance reasons, this is demonstrably false.
First let’s talk about benchmarks. If you look at the latest data from a survey, you will see that PHP does quite well. It’s on par with node.js, and easily beats out many other popular frameworks built on interpreted languages (e.g. Rails and Django). PHP is never going to compete with the performance of a compiled language like Go or Java, and it’s not trying to. On the spectrum of interpreted web languages, PHP excels.
PHP performance also continues to get better with every release. PHP 5.3 was ~20% faster than 5.2, and 5.4 showed a 20-40% improvement over 5.3. Then with PHP 5.5 we got a bundled opcode cache, which has a dramatic positive impact on PHP’s out of the box performance, and removes the necessity of installing APC. The core PHP developers care deeply about performance, and the consistent improvements from version to version show that this will continue to be an area of focus going forward.