PHP 7.3 Performance Benchmarks Are Looking Good Days Ahead Of Its Release (phoronix.com)
PHP 7.3 RC6 was released earlier this week. Phoronix ran some benchmarks and compared the performance of v7.3 RC6 with releases going back to the v5.5 series. From the story: I ran some fresh benchmarks over the past day on PHP 5.5.38, PHP 5.6.38, PHP 7.0.32, PHP 7.1.24, PHP 7.2.12, and the PHP 7.3.0-RC6 test release. All of the PHP5/PHP7 builds were configured and built in the same manner. All tests happened from the same Dell PowerEdge R7425 dual EPYC server running Ubuntu 18.10 Linux.
Besides continuing to evolve the performance of PHP7, the PHP 7.3 release is also delivering on FFI (the Foreign Function Interface) to access functions / variables / data structures from the C language, a platform-independent manner for obtaining information on network interfaces, an is_countable() call, WebP support within GD's image create from string, updated SQLite support, improved PHP garbage collection performance, and many other enhancements. PHP 7.3 is just shy of 10% faster than PHP 7.2 in the popular PHPBench. PHP 7.3 is 31% faster than PHP 7.0 or nearly 3x the speed of PHP5.
Besides continuing to evolve the performance of PHP7, the PHP 7.3 release is also delivering on FFI (the Foreign Function Interface) to access functions / variables / data structures from the C language, a platform-independent manner for obtaining information on network interfaces, an is_countable() call, WebP support within GD's image create from string, updated SQLite support, improved PHP garbage collection performance, and many other enhancements. PHP 7.3 is just shy of 10% faster than PHP 7.2 in the popular PHPBench. PHP 7.3 is 31% faster than PHP 7.0 or nearly 3x the speed of PHP5.
Besides the critics, PHP is mature, well maintaned, has a good interaction with C and is easy to program.
Working on horrendous legacy code, we did a whole system rewrite and saw our server costs cut in half. Our main expenses are staff wages and server costs. Performance is a real issue.
Disclaimer: Professional PHP dev here.
One of the things really annoying about PHP is that it's so n00b friendly you run across tons of crap code. The upside is that PHP is quite hilarious. There's not a week that goes by that doesn't have me laugh out load about some quirky thing PHP had up its sleeve.
The truth is also that PHP is so domain specific that it really gets SSI programming done better than any other solution out there.
PHPs badness is its advantage.
We suffer more in our imagination than in reality. - Seneca
To the contrary: Since the advent of time, increasing speed of a base process made other non-speed-optimized processes based on it feasible, leaving room for other developments.
Python, Go, RoR 5, in that order
moox. for a new generation.
I'm sure Facebook, arguably the largest PHP user on the web, would disagree with not needing more performance. An extra 1-2% performance bump is equivalent to getting an extra year of use out of compute resources they already own and have received a tax benefit from depreciation. It's million of dollars of free money.
moox. for a new generation.
But has it been rewritten to use the new and improved PHP?
Isn't Facebook using HHVM ?
New things are always on the horizon
My guess is Facebook uses HHVM, but a quick look around on the web didn't tell me how that related to normal PHP.
New things are always on the horizon
Python? Never used it for web backend, but wouldn't it make more sense to use something thats been developed for exactly that purpose for 25 years? i.e. PHP
While this all makes sense, my problem with PHP ain't CPU burn, it's memory usage. What I need from my PHP CMS is for it to use less RAM, not for it to use less CPU. CPU is cheap, RAM ain't.
"You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
As a programmer you need to be able to speak the most popular language of the web which is PHP. But, that doesnâ(TM)t mean you only need to use PHP. Just have an understanding of atleast 3 to 4 major languages and decide which one to use based the task you are trying to accomplish. Personally, I donâ(TM)t use Python for basic website with a backend. With both Flask and Django around I donâ(TM)t think python is a good programming language to use when it comes to web development . And on the other side I donâ(TM)t use PHP for ML application because Python does that way better than any other languages .
PHP was designed for the 1993 era web. If you're still developing 1993-era web pages, stick with PHP.
If you have an html page and want to add some dynamic text, it's great. That's what it's optimized for. Rewriting something that's mostly static text with RoR or node or whatever is stupid.
OP asked about an API. Maybe something CRUD like (GET /anonymous_coward/posts to return a json array). Well, PHP can do it (possibly abusing 404 errors, possibly with apache/nginx URL rewriting. But it's going to be ugly and it's not what PHP was made for. Plenty of general purpose programming languages have routing libraries/frameworks that were made for that.
Copyright (c) 1990 - 2014 Dice. All rights reserved. Use of this comment is subject to certain Terms and Conditions.
No, it uses Delphi which was an early language by Anders Heidlburger. He threw it away and started over with a little language known as Node.JS.
Copyright (c) 1990 - 2014 Dice. All rights reserved. Use of this comment is subject to certain Terms and Conditions.
Facebook uses Hack. Originally, Hack was a PHP superset with types and some other extensions and better performance. In theory, PHP code could run under the Hack/HHVM interpreter/runtime without modifications. Around the time of PHP 7, Hack went their own way and is no longer a superset of PHP.
Prior to Hack/HHVM, they also tried HipHop, which transpiled PHP to C which was then compiled.
Copyright (c) 1990 - 2014 Dice. All rights reserved. Use of this comment is subject to certain Terms and Conditions.
PHP has been developed for web APIs? Wasn't it developed to serve dynamic web pages?
Ezekiel 23:20
As a programmer you need to be able to speak the most popular language of the web which is PHP
No, you don't.
Memory is only used during a request. When a request is done, you get your free memory back. When a request is dealt with faster, you get more free memory in total (or you can handle more requests).
Well, don't worry about that. We can get you back before you leave. (Dr. Who)
So what? I'm not waiting on PHP, ever. I'm waiting on the network or the database, and making PHP faster won't appreciably affect execution time.
"You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
So what? So wat? :)
Are you from Murica?
I thought Dutch people were rude, but muricans on slashdot are quite something too.
Well, don't worry about that. We can get you back before you leave. (Dr. Who)