PHP 5.6 vs. PHP 7 Performance Comparison
gbksoft.com
gbksoft.com
> One way or another, each programming language is translated to the binary code by using the compiler. PHP is no different. But what makes it unique is a Just in Time engine, that allows compilation of the code during the execution of the program. This principle is also known as dynamic translation.
I mean, I guess this weird explanation is fine for a php consultant, but honestly I wouldn't trust any results presented next a description this wrong.
The second one if actually wrong unless something changed very recently, PHP is not JIT compiled (at least not to machine code). It is a bytecode VM. I remember the discussion came up and optimizing the byte code was actually improved performance more than proof of concept JIT did for common PHP use cases.
PHP 8 is supposed to have a JIT I believe.
The arguments for why switch are pointless, no mention of the actual benefits. Statements like "Hopefully, JIT was integrated into PHP 7", and a very special explanation of compilation and jit. It makes me not trust anything written here.
Seriously, how can a person call himself a "PHP guru" and at the same time tell people that it's faster as a result of JIT compilation when PHP doesn't use JIT compilation? Amazing.
"PHP guru"
PHP doesn't use JIT compilation...
There for example is no mention of the php7 version tested: 7.0? 7.1? 7.2? No version of hhvm either. No clear details on what the tested code does: what kind of setup/options is used, which Wordpress page(s) is actually called. How much memory the machine has, how php is configured regarding the opcache, ...
Also, why posting this to HN now? Php 7 has been released more than 2 years ago, those improvements have been discussed a long time ago.