Live data from Hacker News

The future of PHP, at a distance

pooteeweet.org

31–40 of 50 posts

Re: The future of PHP, at a distance

#31

From my understanding, if the day ever comes where the official PHP engine is switched to HHVM, it would catapult performance past Python and Ruby in pretty much all scenarios.

Does HHVM get massive gains for "normal" PHP code? I remember reading something about FB's early efforts, and there were strict guidelines about proper usage and whatnot.

I have no idea how "good" "normal" PHP code is written compared to Ruby/Python.

Re: The future of PHP, at a distance

#32
post #26
post #6

The only advantage of using PHP in my eyes is: incredible cheap and hassle-free hosting for beginners. If you change something when introducing HHVM to the masses, then you would have a game-breaker. If you can afford/achieve anything better than "drag'n'drop" your "index.php" there, and open your browser to "test if it works", do it. Except, of course, you have to maintain tons of legacy stuff already written in PHP…

> The only advantage of using PHP in my eyes is: incredible cheap and hassle-free hosting for beginners. Well, clearly the engineers working on Facebook's PHP (and several other large projects, from Yahoo! to Wordpress.com) aren't "begineers" neither looking for "cheap, hassle-free hosting". I don't buy the "it's so crap, it's ONLY used because of cheap hosting" argument. It's also a pragmatic language, with tons of…

The engineers working on FB's PHP have reimplemented the runtime. I doubt that was a bonus or a reason they considered PHP. I find it highly unlikely anyone started off using a platform with the goal of "we get to completely re-implement this platform because it will not work for us otherwise."

Re: The future of PHP, at a distance

#34
post #26

Earlier quoted context omitted.

> The only advantage of using PHP in my eyes is: incredible cheap and hassle-free hosting for beginners. Well, clearly the engineers working on Facebook's PHP (and several other large projects, from Yahoo! to Wordpress.com) aren't "begineers" neither looking for "cheap, hassle-free hosting". I don't buy the "it's so crap, it's ONLY used because of cheap hosting" argument. It's also a pragmatic language, with tons of…

Facebook just can't "switch" their backend. The mountain of built PHP stuff, including HHVM, is just too big to give up. They're of course not the typical beginners, but it's really easy to "get shit done" in PHP, so it happened that they used PHP when it all exploded in popularity, and mostly had to think on how to scale a running system massively, and not to rewrite everything from scratch again. On the libraries s…

Unless the Facebook backend is a giant monolithic service, they seemingly could have used a loosely-coupled service-oriented architecture and rewrite individual services in some new language or platform. That's how Twitter migrated from Ruby to Java.

Re: The future of PHP, at a distance

#35

From my understanding, if the day ever comes where the official PHP engine is switched to HHVM, it would catapult performance past Python and Ruby in pretty much all scenarios.

Does HHVM get massive gains for "normal" PHP code? I remember reading something about FB's early efforts, and there were strict guidelines about proper usage and whatnot. I have no idea how "good" "normal" PHP code is written compared to Ruby/Python.

We tried HHVM for use with our "normal" PHP.

There was a measurable performance increase, but it was disappointing overall. Perhaps my initial hopes were too high.

Our company is small and engineering/ops resources are very limited, leading to a lot of pragmatic decisions. After a few days of experimentation, I decided that HHVM was promising, but for us it's not yet worth the extra ops infrastructure.

We get much bigger improvements tuning other pieces of our stack.

Re: The future of PHP, at a distance

#36
post #29
post #26

Earlier quoted context omitted.

> The only advantage of using PHP in my eyes is: incredible cheap and hassle-free hosting for beginners. Well, clearly the engineers working on Facebook's PHP (and several other large projects, from Yahoo! to Wordpress.com) aren't "begineers" neither looking for "cheap, hassle-free hosting". I don't buy the "it's so crap, it's ONLY used because of cheap hosting" argument. It's also a pragmatic language, with tons of…

> So, it might be far from perfect, but than again, Javascript is far from perfect too, C++ is also flawed and Java has tons of bad decisions in its design (and culture). Still, those are some of the more widely used languages. Still, I wouldn't take a job in any of them. Javascript is crap, only used because it runs in the browser. C++ is pretty crap, only used because it has manual memory management. Java has its p…

Define 'better'. Personally I think Clojure has a lot going for it, and it's better than a lot of languages in a many ways. However, for the kind of application I work on PHP is significantly better fit than Clojure. Most of the points made in this talk apply to my situation. http://www.infoq.com/presentations/php-history

Re: The future of PHP, at a distance

#37
post #29

Earlier quoted context omitted.

> So, it might be far from perfect, but than again, Javascript is far from perfect too, C++ is also flawed and Java has tons of bad decisions in its design (and culture). Still, those are some of the more widely used languages. Still, I wouldn't take a job in any of them. Javascript is crap, only used because it runs in the browser. C++ is pretty crap, only used because it has manual memory management. Java has its p…

Define 'better'. Personally I think Clojure has a lot going for it, and it's better than a lot of languages in a many ways. However, for the kind of application I work on PHP is significantly better fit than Clojure. Most of the points made in this talk apply to my situation. http://www.infoq.com/presentations/php-history

The main "better" I care about is "fewer gotchas and special cases to memorize"; that's not the only thing that matters about programming languages, but it's a big factor. I don't have time to watch a 40-minute video; arguments I remember hearing from something similar are the very fast coding feedback cycle (easy with modern-day rails/django/etc.), "it's better than it used to be" (not really an argument), availability of frameworks (but I've never seen an actual example of the advantages that you don't get in other languages/frameworks), large standard library (again, present in other languages), dependency management (which seems more like php catching up with other languages than overtaking them), deployment (may have been a good argument in the pre-wsgi days and when Apache was the only webserver around, but not true any more IMO). What is it you see PHP as better than ruby/python at?

Re: The future of PHP, at a distance

#38

From my understanding, if the day ever comes where the official PHP engine is switched to HHVM, it would catapult performance past Python and Ruby in pretty much all scenarios.

Predicting the future is risky.

HHVM exists. You can benchmark it against Python and Ruby today. What are the results?

In any case, Python has things like cx_freeze that can be used to make apps close to compiled performance. And Python is not a single monolithic implementation. IronPython running on .NET for instance. PyPy has a VM with JIT.

In any case, few people these days are worried about raw performance of apps. There are easier things to fix with page load times, getting rid of resource locking, and so on.

HHVM will extend PHP's useful lifetime but outside of Facebook, Drupal-based sites, and WordPress-based sites, I don't see it growing in any significant way.

Re: The future of PHP, at a distance

#39

From my understanding, if the day ever comes where the official PHP engine is switched to HHVM, it would catapult performance past Python and Ruby in pretty much all scenarios.

Predicting the future is risky. HHVM exists. You can benchmark it against Python and Ruby today. What are the results? In any case, Python has things like cx_freeze that can be used to make apps close to compiled performance. And Python is not a single monolithic implementation. IronPython running on .NET for instance. PyPy has a VM with JIT. In any case, few people these days are worried about raw performance of app…

If you add up Facebook + Drupal + Wordpress you probably come to a large % of total worldwide pageviews.

Re: The future of PHP, at a distance

#40

From my understanding, if the day ever comes where the official PHP engine is switched to HHVM, it would catapult performance past Python and Ruby in pretty much all scenarios.

Does HHVM get massive gains for "normal" PHP code? I remember reading something about FB's early efforts, and there were strict guidelines about proper usage and whatnot. I have no idea how "good" "normal" PHP code is written compared to Ruby/Python.

It works for Wordpress and Drupal, and those contain 90% of PHP functions. I mean there are times you will find issues or what not, but for the most part it's pretty good.
Post reply on HN