6 ms·
I'm glad to see such positive news about PHP. It received way too much beating from the community in the last couple of years while constantly improving. Inter
by romankolpak 11y ago
I'm glad to see such positive news about PHP. It received way too much beating from the community in the last couple of years while constantly improving.
Interesting to see some benchmarks on how PHP7 compares to Python and Ruby in terms of performance.
- zapt02 11y agoPHP has been faster than Ruby and Python for some time now in raw processing strength, see here for some benchmarks: http://benchmarksgame.alioth.debian.org/u64q/php.html http://benchmarksgame.alioth.debian.org/u64q/php.html
- andreasklinger 11y agoafair PHP was almost always faster than ruby/python for normal web sites The problem was usually the frameworks. I remember benchmarks that went down in orders of magnitude as soon as you loaded a framework. That experience was 7-10years ago. I assume this changed by now.
- CiPHPerCoder 11y agoThat depends entirely on the framework in question.
- brightball 11y agoThis was why: http://www.brightball.com/php/what-s-the-right-php-framework http://www.brightball.com/php/what-s-the-right-php-framework
- imakesnowflakes 11y agoPhp is faster than python because it lacks so many dynamic capabilities of Python. So you are loosing all that and gain a little in performance, but not anywhere near that of a compiled language. A lose lose situation...
- FranOntanaya 11y agoI think one overlooked good thing is how little drama I hear about the transition from 5.6 to 7. People seem to be moving on quickly (the large perf improvements help a lot). I feel it's not going to be long before almost anyone with a half skilled dev to care for it will be on 7 and we won't have a Python 2 vs 3 or Perl 5 vs 6 scenario.
- pilif 11y agoPHP7 is much closer to 5 than Python 3 was to 2. Aside of a few very clearly defined changes, PHP 7 happily runs php5 code. Python 3 made huge changes, especially to string handling and input/output which is what most applications do all the time. And perl 6 is practically a completely different language. I wouldn't count that. What is interesting about php7 is how much effort and how little complaining goes into porting the C extensions: that API has changed a lot and the documentation is still spread all over wikis and blog posts. And yet there is a php7 port of many third party extensions already But I guess the huge performance improvements are a strong motivator even there
- vpkaihla 11y agoThe reason for that is that python2=>3 fixed several fundamental problems. 5.6 => 7 is just a incremental upgrade, whatever the version numbering tells you. Most of the PHP problems are still there.
- MAGZine 11y ago> The reason for that is that python2=>3 fixed several fundamental problems. 5.6 => 7 is just a incremental upgrade, whatever the version numbering tells you. Most of the PHP problems are still there. too bad for py3's fundamental problem: that it broke the interface so badly, people still don't use it. PHP7 has no such problem, and gets to add boatloads of new features (which will be immediately used/adopted) while deprecating old versions of the language.
- deleted 11y ago[deleted]
- rebootthesystem 11y agoEvery time I deploy a Python site I think "man, this is so easy with PHP" and wonder if it might be worth switching back.
- kbenson 11y agoUnfortunately, there are still some security issues popping up on a regular basis[1]. Hopefully it's at least better than 5.6 in that respect though[2]. 1: https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=php+7.x https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=php+7.x 2: https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=php+5.6.x https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=php+5.6.x
- ludamad 11y agoGenuinely curious, what makes PHP so easy?
- nathancahill 11y agoOn the most basic level: Most shared hosting supports PHP out of the box. FTP files over, and done. Also, PHP can be run by loading a URL and returning HTML, no framework required. On a higher level: It's much harder to get right.
- collyw 11y agoOnce you have a Python environment set up its just a matter of copying files over as well for an upgrade, so I guess a lot of it is down to web server configuration.
- nathancahill 11y agoIn what environment?
- collyw 11y agoThat has applied to Apache and Nginx configurations that I have used. Git pull and the code is updated. Restart the web server and you are good to go.
- imakesnowflakes 11y ago> It received way too much beating from the community in the last couple of years.. I think it didn't get the beating it deserve. If it was by merit alone, this language should be dead by now. People keep saying that it is improving. But actually it is not. The rotten core, what makes php php, very much remain, and it is still a very dangerous language to use for anything serious [1]. [1] https://www.reddit.com/r/PHP/comments/41bm7j/new_rfc_allow_specifying_keys_in_list/cz1qnca https://www.reddit.com/r/PHP/comments/41bm7j/new_rfc_allow_s...