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

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.

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:
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
Facebook HipHop developer mailing list
Facebook’s HipHop Goes Public With a New PHP Runtime
An interview with a Facebook employee about PHP
If you liked this article
If you liked this article, don’t forget to subscribe for updates!
Get updates by RSS (What’s RSS?)
Follow me on Twitter
Top Incoming Search Terms
“leave a reply”+“hiphop” site:org " reply"site:http://digitivity.org/ 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 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 quick download hiphop php roadsend php compiler windows site:backgammon-online.info site:http://digitivity.org windows hphp hiphop wordpress blogsRelated posts:
- How Facebook Runs PHP and MySQL I was surprised to know that Facebook runs on PHP....
- Heise’s 2-Click Solution for Facebook Privacy Heise, a German computer magazine, tweaked their website to force...
- Facebook Timeline Will Let You Know Who Unfriended You Up until now you’ve been able to find out who...
- The Origins of Facebook, Hacked E-mails, and Privacy Facebook is one of the largest sites on the Internet....
- 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: compiler, Facebook, HipHop, HPHP, HPHPi, optimization, PHP, server



![[del.icio.us]](http://digitivity.org/blog/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://digitivity.org/blog/wp-content/plugins/bookmarkify/digg.png)
![[dzone]](http://digitivity.org/blog/wp-content/plugins/bookmarkify/dzone.png)
![[Facebook]](http://digitivity.org/blog/wp-content/plugins/bookmarkify/facebook.png)
![[LinkedIn]](http://digitivity.org/blog/wp-content/plugins/bookmarkify/linkedin.png)
![[Reddit]](http://digitivity.org/blog/wp-content/plugins/bookmarkify/reddit.png)
![[Slashdot]](http://digitivity.org/blog/wp-content/plugins/bookmarkify/slashdot.png)
![[StumbleUpon]](http://digitivity.org/blog/wp-content/plugins/bookmarkify/stumbleupon.png)
![[Technorati]](http://digitivity.org/blog/wp-content/plugins/bookmarkify/technorati.png)
![[Twitter]](http://digitivity.org/blog/wp-content/plugins/bookmarkify/twitter.png)
![[Yahoo!]](http://digitivity.org/blog/wp-content/plugins/bookmarkify/yahoo.png)
![[Email]](http://digitivity.org/blog/wp-content/plugins/bookmarkify/email.png)


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?
Thanks for the insight.
it’s good news for PHP Developers, Now i looking it on net and try to develop some application with HipHop PHP..
Lol Facebook naming fail… Only they would come up with something this stupid.
I dugg some of you post as I thought they were very useful very beneficial
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.
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.
A large i would like to show some gratitude to your blog post. Thank you Once again.