Live data from Hacker News

Why PHP continues to thrive in the age of the PaaS

plus.google.com

91–100 of 102 posts

Re: Why PHP continues to thrive in the age of the PaaS

#92
post #86

Earlier quoted context omitted.

I have a bone to pick with your last contention. At what load does the PHP runtime begin to become the performance bottleneck, particularly with APC enabled? As far as I know, Facebook is about the only application with enough load to test the limits of the PHP interpreter itself. I was under the impression that PHP itself is actually quite performant...

Facebook runs compiled/JITted PHP code.

Right, but they are only doing that because they serve so much traffic. The original post suggested performance "falls to shit pretty immediately at load." I cannot imagine they meant that you need to do some serious gymnastics to get around performance bottlenecks when you get to Facebook's scale. My supposition is that most web scripting languages would need tuning at that level.

Re: Why PHP continues to thrive in the age of the PaaS

#93

Earlier quoted context omitted.

I have a bone to pick with your last contention. At what load does the PHP runtime begin to become the performance bottleneck, particularly with APC enabled? As far as I know, Facebook is about the only application with enough load to test the limits of the PHP interpreter itself. I was under the impression that PHP itself is actually quite performant...

see: drupal. having to execute the whole application from the entry point on every page hit is just awful. APC will only save you the loading from the disk and compiling part, not the whole execution chain. with node and others the application is just sitting there, listening to a port, and fires the right callbacks when a request comes in. the application startup cost is paid once. not on every request. there are pe…

Drupal lives in its own separate category somewhere near Mars. Just because Drupal is slow does not mean that PHP itself is the reason why.

> APC will only save you the loading from the disk and compiling part

Is that not the slowest part?

According to the benchmarks here, http://www.techempower.com/benchmarks/#section=data-r7&hw=i7..., PHP is only really slower than Node in serving up a plaintext response and a json serialization (although, it is only about a 5% difference in responses/sec between the two).

Re: Why PHP continues to thrive in the age of the PaaS

#94

PHP also has a lot of very cheap hosting options, I have seen them advertised for as little as $3 per month. Trying to host rails for less than $10-15 is challenging. There's also a ton of complete software solutions available, like phpBB, vBulletin , Wordpress etc. The PHP industry offers more scripts for a one off $x download which can then be deployed via FTP by a non-technical person who doesn't know git. The rai…

If you include cheap-o VPS like DigitalOcean into the Rails hosting, then yes you can get it for $5. But then the money you're saving will go into setting up the instance.

Re: Why PHP continues to thrive in the age of the PaaS

#95
I think it boils down a little that for PHP you get php-fpm with the distro package and with Flask/Sinatra for example you have to

  * decide which *(c|s)gi package you want to use
    (thin, webrick, gunicorn, unicorn, puma, tornado, 100 more)
  * write your own supervisord/circus/god/whatever 
    wrapper to make it restart automatically
  * fight rvm/virtualenv/chruby/whatever
Notice a pattern? I can deploy a sensible, non-minimal php web app with "apt-get install nginx php5-fpm && scp" whereas I need already a decent amount of decisions for the other 2.

With PHP deployment only gets complicated at a larger scale. With Python and Ruby web apps it's complicated from the start.

Re: Why PHP continues to thrive in the age of the PaaS

#96
post #23

Earlier quoted context omitted.

The problem is learning PHP actually makes you worse at PHP. The only possible way to program PHP is to be pretty much ignorant of everything in which case PHP will actually do kinda what you wanted. If you learned PHP then either it's not actually doing what you think it's doing, or some config variable changed and would have done what you thought except it didn't, but don't worry just add some code to change that c…

I think the big problem with PHP is the fact that you can find so many tutorials online still not having caught up with current practices, not just in terms of language updates or security, but in terms of software engineering. Not knowing any better and how to distinguish between quality learning material, newcomers will happily put into practice what they've learned on good 'authority' to be correct. Same applies f…

Hi, this is very interesting to me as I am currently picking up PHP.

Can you point me to some resources which don't fall into the trap you highlighted?

Re: Why PHP continues to thrive in the age of the PaaS

#97
post #58
post #24

Earlier quoted context omitted.

> You're making the mistake of conflating PHP the language with Rails the Framework. I've heard someone call PHP "the C web framework". I thought it was fitting, and in addition, it seemed that even as a C web framework, it was a failure.

PHP may have some rather serious flaws but it is far from a failure and runs on a huge majority of the web.

"but it is far from a failure"

CS-wise (and design-wise), it's very much a failure. It's a market success, though - just like VHS was, many years ago. ;-)

Re: Why PHP continues to thrive in the age of the PaaS

#98
post #24

Earlier quoted context omitted.

> You're making the mistake of conflating PHP the language with Rails the Framework. I've heard someone call PHP "the C web framework". I thought it was fitting, and in addition, it seemed that even as a C web framework, it was a failure.

PHP the C web framework? PHP a failure? Lol!

"Lol!"

I think you're in the wrong place. Reddit is this way.

Re: Why PHP continues to thrive in the age of the PaaS

#99
post #79

Your comparison is invalid and irrelevant. You're comparing writing a simple PHP script on a remote server to deploying a full Rails app. Please do the same comparison with Rails vs Symfony/ZF and then we'll talk about it. When I used to be a Ruby developer, every time I heard that "PHP is easy to deploy", I made a less-than-one-minute demo showing how to create a Sinatra app from scratch and deploy it on Heroku is j…

"You're comparing writing a simple PHP script on a remote server to deploying a full Rails app" <-- the point is, Can you do that in rails?

Re: Why PHP continues to thrive in the age of the PaaS

#100

I don't do much web development, just a product once every year or so to play around with an idea. Always in PHP. A few months ago I was asked by a close friend to help them with a not-so-serious site. I decided that I'd use Rails, because, hey, I've heard nothing but good about it from HN and the like. I was absolutely blown away by how much work it required to get started. That, and how painful it was to explain to…

Laravel seems a much better investment for you.
Post reply on HN