February 3, 2010 | Developer

hiphop_logo_white

PHP is the programming language that runs many web applications, including WordPress. PHP’s slower than many other languages, but it’s fast to develop in.

Now Facebook, which also runs on PHP, has announced a new version of PHP that runs twice as fast.

This also means that if you have a popular WordPress blog, you might only have to have half the server size you use now.

How PHP Works

Turtle
PHP, in its usual incarnation, is an interpreted language. This means that a program (such as a PHP module in the Apache webserver) reads the PHP instructions in your script and executes them in turn. Every time the PHP script is executed, it has to be turned into machine code, even if the script runs 1000 times per hour. Obviously, this is inefficient, but people put up with it because PHP is considered easier to develop in than other languages.

Rabbit
By comparison, C++ is a language which is usually compiled (changed to machine instructions which run directly on the CPU). This happens only once, and every time the program runs, it runs directly on the processor. Because there’s no intermediate interpretation step, C++ programs run much faster.

Facebook’s HipHop PHP

Facebook announced what they are calling HipHop PHP, which translates PHP into C++. Then you use g++, the GNU C++ compiler, to compile the C++ program.

Here’s how the process works:

HipHop PHP Transformation Process

HipHop PHP Transformation Process

Facebook says compilation of their PHP code results in savings of 50% in server usage.

They also released HPHPi, which is an optimized PHP interpreter that doesn’t require you re-compile your code.

Download HipHop PHP

Facebook is going to release the code to HPHP under the PHP license on Github for download at this address (but it’s not there yet).

Caveats

In order to optimize PHP to the maximum, they left out some rarely used dynamic functionality, such as the eval() function.

I’ll report more on HipHop PHP as Facebook releases more information.

Resources

Facebook HipHop PHP announcement

HipHop release video

Facebook HipHop developer mailing list

ZDNet article

HipHop for PHP: Who Benefits?

BestTechie article

Feed2Meme article

Facebook’s HipHop Goes Public With a New PHP Runtime

PHPC: A PHP Compiler

Roadsend PHP compiler

An interview with a Facebook employee about PHP

PHP Facebook release


If you liked this article

If you liked this article, don’t forget to subscribe for updates!

Subscribe to New Articles by RSS or E-mail

Get updates by RSS (What’s RSS?)

Subscribe by email:

Follow me on Twitter


Top Incoming Search Terms

“leave a reply”+“hiphop” site:org " reply"site:http://digitivity.org/ "leave a reply" site:http://digitivity.org/ +hiphop programming compiling hip hop php on a mac compiling hip hop php under windows compiling hiphop on windows compiling wordpress hiphop download hiphop php compiler dreamhost hiphop php facebook announce compile php facebook hip hop compiler facebook hip hop windows facebook hiphop for windows facebook hiphop wordpress facebook runs on php flux facebook programming language hip hop compiler hip hop drupal compile hip hop php hip hop php on windows hip-hop php under windows hiphop compiler hiphop for php "on windows" apche hiphop for php mac hiphop for php on mac hiphop for php setup hiphop for windows hiphop php compiler download hiphop php compiler software hiphop php compiler window hiphop php mac hiphop php on mac hiphop php windows hiphop programming language hiphop windows hiphop windows server php hiphop-php hiphop-php under mac hiphop-php windows hiphop-php wordpress how hiphop php works installing hip hop php on dreamhost is facebook hiphop is available for windows mac "hiphop for php" php calling compiled hiphop php hip hop + windows php hip hop for windows php hiphop php hiphop +windows php hiphop compiler for windows php hiphop compiler on windows php hiphop compiler windows php hiphop windows plastic surgery pittsburgh quick download hiphop php roadsend php compiler windows site:backgammon-online.info site:http://digitivity.org transformation process windows hphp hiphop wordpress and hiphop facebook wordpress blogs

Related posts:

  1. How Facebook Runs PHP and MySQL I was surprised to know that Facebook runs on PHP....
  2. Heise’s 2-Click Solution for Facebook Privacy Heise, a German computer magazine, tweaked their website to force...
  3. Facebook Timeline Will Let You Know Who Unfriended You Up until now you’ve been able to find out who...
  4. The Origins of Facebook, Hacked E-mails, and Privacy Facebook is one of the largest sites on the Internet....
  5. How to Serve Your WordPress Blog from the Root Directory If It’s Installed in a Subdirectory If your blog is the main point of focus for...

Explore related content: , , , , , , ,

17 Responses to “Facebook Announces a Better, Faster PHP: HipHop PHP”

  1. Hey thanks for that interesting post.
    But I was having some problem with viewing some of the images in mozilla firefox.
    Is it the fault in my browser?

  2. Thanks for the insight.

  3. it’s good news for PHP Developers, Now i looking it on net and try to develop some application with HipHop PHP..

  4. Lol Facebook naming fail… Only they would come up with something this stupid.

  5. I dugg some of you post as I thought they were very useful very beneficial

  6. Thank you a lot for providing individuals with such a remarkable possiblity to check tips from here. It is often so good and stuffed with a great time for me and my office peers to visit your website more than thrice in a week to read through the latest issues you have. Not to mention, I am also usually satisfied considering the cool creative concepts served by you. Selected 4 ideas in this post are completely the most effective we have ever had.

  7. Thank you for the sensible critique. Me and my neighbor were just preparing to do a little research on this. We got a grab a book from our area library but I think I learned more clear from this post. I’m very glad to see such excellent info being shared freely out there.

  8. A large i would like to show some gratitude to your blog post. Thank you Once again.

  9. This may not be the best place to request this, but I am searching for a pest control provider within the pittsburgh region and have no way to find out who is the very best. I found this company that’s definitely close to me and wanted to see if any one has any testimonials on them. Spectrum Pest Control, 3058 West Liberty Avenue, Dormont, PA 15216 – (412) 446-2802

  10. thanks for post. good job.

  11. Well I really enjoyed reading it. This information procured by you is very useful for good planning.

  12. Thanks for the posting. My spouse and i have usually seen that a lot of people are eager to lose weight simply because wish to look slim plus attractive. Nevertheless, they do not always realize that there are more benefits for you to losing weight in addition. Doctors state that obese people are afflicted with a variety of health conditions that can be perfectely attributed to their particular excess weight. The good thing is that people who sadly are overweight plus suffering from various diseases can help to eliminate the severity of their own illnesses by losing weight. It is easy to see a constant but identifiable improvement in health when even a bit of a amount of fat reduction is attained.

  13. pozycjonowanie…

    pozycjonowanie stron…

  14. Horace says:

    It is good news.

  15. I believe it’s great that you write this cognitive content here.
    Thank you for your cleared words and large thoughts.
    Perfect tense for me this journal. Large infos and this can serve me.

  16. b2b business says:

    very interesting post. I do think that there sould be more good articles like yours on the web. Keep ongoing like this

  17. We would also like to express that most of those who find themselves devoid of health insurance are normally students, self-employed and people who are laid-off. More than half of those uninsured are really under the age of Thirty five. They do not really feel they are in need of health insurance because they are young plus healthy. The income is typically spent on real estate, food, in addition to entertainment. Some people that do work either full or in their free time are not made available insurance via their jobs so they go without due to the rising valuation on health insurance in the usa. Thanks for the concepts you reveal through this blog.

Leave a Reply

CommentLuv Enabled