4 ms·
PHP 5.6 vs. PHP 7 Performance Comparison
- blowski 9y agoPersonally, I've found the biggest performance improvement comes with instantiating classes. I don't understand the internals well enough to explain, but in profiling, I've always seen significant improvements.
- dreistdreist 9y agoSpaceship operator is mentioned, but nothing about the much improvemed type declarations?
- bkovacev 9y agocan't access - HN hug of death?
- bartkappenburg 9y agoOT: do they run on 5.6 or 7? ;-)
- remote-work 9y agoLooks like .NET site :- )
- bernarpa 9y ago<<Need a consultation of PHP developmer? CONTACT GURU OF PHP!>>
- SiempreViernes 9y agoHe can also write your web services in runtime interpreted C++!
- chinathrow 9y agoNot sure why people are still comparing towards PHP 5.6 as that version is slated for EOL later this year. http://php.net/supported-versions.php http://php.net/supported-versions.php
- pasta 9y agoBecause in the hosting world this is still one of the dominant versions.
- SiempreViernes 9y ago> You may already know that PHP, C++, Swift, and any other modern programming language is not communicating directly to the hardware. The programming language is just an easier way to talk to the machine. The machine native language is still binary code. > 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.
- deleted 9y ago[deleted]
- throwaway2016a 9y agoThe first part is kind of baffling. I'm not even sure what is trying to be said there. English as a second language? 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.
- maaaats 9y agoNot to be overly dismissive, but this article is just... weird? 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.
- NightlyDev 9y agoThe person writing this has no idea about what he's talking about, so you're not the only one finding it untrustworthy. 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.
- remote-work 9y agoThe article's website does not load for me with CloudFlare DNS (1.1.1.1)
- NightlyDev 9y ago"JIT was integrated into PHP 7, which is why it has almost the same results as HHVM." "PHP guru" PHP doesn't use JIT compilation...
- blowski 9y agoHHVM does have JIT, but you're right that PHP 7 does not. Maybe they were thinking about the AST. Anyway, it looks like they've corrected the article.
- gregoriol 9y agoThis article is non-sense from a technical point of view: there are so few details on what is tested, on which conditions, ... 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.