Hacker News new | ask | show | jobs
by perucoder 5724 days ago
Facebook uses PHP for the user-facing portion of the site. Here's a link where they discuss some of what they do

http://blog.facebook.com/blog.php?post=2356432130

1 comments

However, Facebook uses HipHop (http://developers.facebook.com/blog/post/358) to make PHP faster (so it's not the plain-vanilla PHP).

From the linked article:

HipHop programmatically transforms your PHP source code into highly optimized C++ and then uses g++ to compile it. HipHop executes the source code in a semantically equivalent manner and sacrifices some rarely used features such as eval() in exchange for improved performance. HipHop includes a code transformer, a reimplementation of PHP's runtime system, and a rewrite of many common PHP Extensions to take advantage of these performance optimizations.

Although it's safe to assume you won't have scalability problems right out of the gate either.

Once you have tens of thousands of hits a week presumably you can port to HipHop yourself ( http://github.com/facebook/hiphop-php ). Needing to scale is a great problem to have.

I completely agree, the best problem in the web world. That's why I'm trying to think of it now because I open the doors to a project I'm developing for myself.

What about the projects that use PHP extensions in the .ini to speed things up (such as http://pecl.php.net/package/APC)