<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Digitivity &#187; PHP</title>
	<atom:link href="http://digitivity.org/tag/php/feed" rel="self" type="application/rss+xml" />
	<link>http://digitivity.org</link>
	<description>The Digital Productivity Blog</description>
	<lastBuildDate>Mon, 24 May 2010 17:50:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Facebook Announces a Better, Faster PHP: HipHop PHP</title>
		<link>http://digitivity.org/771/facebook-announces-a-better-faster-php-hiphop-php-c-plus-plus-compiler</link>
		<comments>http://digitivity.org/771/facebook-announces-a-better-faster-php-hiphop-php-c-plus-plus-compiler#comments</comments>
		<pubDate>Wed, 03 Feb 2010 17:52:31 +0000</pubDate>
		<dc:creator>Digitivity</dc:creator>
				<category><![CDATA[Developer]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[HipHop]]></category>
		<category><![CDATA[HPHP]]></category>
		<category><![CDATA[HPHPi]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://digitivity.org/?p=771</guid>
		<description><![CDATA[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. 



Related posts:<ol><li><a href='http://digitivity.org/165/how-facebook-runs-php-and-mysql' rel='bookmark' title='Permanent Link: How Facebook Runs PHP and MySQL'>How Facebook Runs PHP and MySQL</a></li>
<li><a href='http://digitivity.org/905/the-origins-of-facebook-hacked-e-mails-and-privacy' rel='bookmark' title='Permanent Link: The Origins of Facebook, Hacked E-mails, and Privacy'>The Origins of Facebook, Hacked E-mails, and Privacy</a></li>
<li><a href='http://digitivity.org/750/back-up-social-media-gmail-facebook-wordpress-and-other-cloud-services-with-backupify' rel='bookmark' title='Permanent Link: Back Up Gmail, Facebook, WordPress, and Other Social Media with Backupify'>Back Up Gmail, Facebook, WordPress, and Other Social Media with Backupify</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><strong>PHP</strong> is the <strong>programming language</strong> that runs many web applications, including <strong>WordPress</strong>. PHP&#8217;s slower than many other languages, but it&#8217;s fast to develop in.</p>
<p>Now <strong>Facebook</strong>, which also runs on PHP, has <a href="http://developers.facebook.com/news.php?blog=1&amp;story=358">announced</a> a <strong>new version</strong> of PHP that runs <strong>twice as fast</strong>.</p>
<p>This also means that if you have a popular <strong>WordPress blog</strong>, you might only have to have <strong>half the server size</strong> you use now.</p>
<h2>How PHP Works</h2>
<p><img class="alignleft size-full wp-image-774" title="Turtle" src="http://digitivity.org/blog/wp-content/uploads/2010/02/1191761_turtle_2.jpg" alt="Turtle" width="100" height="74" /><br />
<strong> PHP</strong>, in its usual incarnation, is an <strong>interpreted language</strong>. 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 <strong>inefficient</strong>, but people put up with it because PHP is considered easier to develop in than other languages.</p>
<p><img src="http://digitivity.org/blog/wp-content/uploads/2010/02/985320_rabbit.jpg" alt="Rabbit" title="Rabbit" width="100" height="75" class="alignleft size-full wp-image-776" /><br />
By comparison, <strong>C++</strong> is a language which is usually <strong>compiled</strong> (changed to machine instructions which run directly on the <strong>CPU</strong>). This happens only once, and every time the program runs, it runs <strong>directly</strong> on the processor. Because there&#8217;s no intermediate  interpretation step, C++ programs run <strong>much faster</strong>.</p>
<h2>Facebook&#8217;s HipHop PHP</h2>
<p><strong>Facebook</strong> announced what they are calling <strong>HipHop PHP</strong>, which translates PHP into <strong>C++</strong>. Then you use <tt>g++</tt>, the GNU C++ compiler, to compile the C++ program.</p>
<p>Here&#8217;s how the process works:</p>
<div id="attachment_772" class="wp-caption alignnone" style="width: 522px"><a href="http://digitivity.org/blog/wp-content/uploads/2010/02/HipHop_transformation_process.png"><img class="size-medium wp-image-772" title="HipHop PHP Transformation Process" src="http://digitivity.org/blog/wp-content/uploads/2010/02/HipHop_transformation_process-512x320.png" alt="HipHop PHP Transformation Process" width="512" height="320" /></a><p class="wp-caption-text">HipHop PHP Transformation Process</p></div>
<p>Facebook says compilation of their PHP code results in <strong>savings of 50%</strong> in server usage.</p>
<p>They also released <strong>HPHPi</strong>, which is an optimized <strong>PHP interpreter</strong> that doesn&#8217;t require you re-compile your code.</p>
<h3>Download HipHop PHP</h3>
<p>Facebook is going to <strong>release</strong> the code to <strong>HPHP</strong> under the PHP license on <strong>Github</strong> for download at this <a href="http://github.com/facebook/hiphop-php/wikis">address</a> (but it&#8217;s not there yet).</p>
<h2>Caveats</h2>
<p>In order to optimize PHP to the maximum, they left out some rarely used dynamic functionality, such as the <tt>eval()</tt> function.</p>
<p>I&#8217;ll report more on <strong>HipHop PHP</strong> as Facebook releases more information.</p>
<h2>Resources</h2>
<p><a href="http://developers.facebook.com/news.php?blog=1&amp;story=358">Facebook HipHop PHP announcement</a></p>
<p><a href="http://www.ustream.tv/recorded/4409735">HipHop release video</a></p>
<p><a href="http://groups.google.com/group/hiphop-php-dev">Facebook HipHop developer mailing list</a></p>
<p><a href="http://blogs.zdnet.com/BTL/?p=30331">ZDNet article</a></p>
<p><a href="http://www.brandonsavage.net/hiphop-for-php-who-benefits-who-doesnt/">HipHop for PHP: Who Benefits?</a></p>
<p><a href="http://www.besttechie.net/2010/02/02/facebook-introduces-hiphop-for-php/">BestTechie article</a></p>
<p><a href="http://feed2meme.com/2010/02/03/facebook-hopes-to-revolutionize-php-with-“hip-hop”/">Feed2Meme article</a></p>
<p><a href="http://www.developer.com/lang/php/article.php/3862461/Facebooks-HipHop-Goes-Public-With-a-New-PHP-Runtime.htm">Facebook&#8217;s HipHop Goes Public With a New PHP Runtime</a></p>
<p><a href="http://www.phpcompiler.org/">PHPC: A PHP Compiler</a></p>
<p><a href="http://www.roadsend.com/home/index.php">Roadsend PHP compiler</a></p>
<p><a href="http://therumpus.net/2010/01/conversations-about-the-internet-5-anonymous-facebook-employee/?full=yes">An interview with a Facebook employee about PHP</a></p>
<p><a href="http://www.taranfx.com/facebook-php-hiphop-open-source">PHP Facebook release</a></p>
<h2>Top Incoming Search Terms</h2><span class="search-terms-term">&ldquo;leave a reply&rdquo;+&ldquo;hiphop&rdquo; site:org</span> <span class="search-terms-term">compiling hip hop php on a mac</span> <span class="search-terms-term">compiling hip hop php under windows</span> <span class="search-terms-term">compiling hiphop on windows</span> <span class="search-terms-term">compiling wordpress hiphop</span> <span class="search-terms-term">download hiphop php compiler</span> <span class="search-terms-term">dreamhost hiphop php</span> <span class="search-terms-term">facebook announce compile php</span> <span class="search-terms-term">facebook hip hop compiler</span> <span class="search-terms-term">facebook hip hop windows</span> <span class="search-terms-term">facebook hiphop for windows</span> <span class="search-terms-term">facebook hiphop wordpress</span> <span class="search-terms-term">facebook runs on php</span> <span class="search-terms-term">hip hop compiler</span> <span class="search-terms-term">hip hop php</span> <span class="search-terms-term">hip hop php on windows</span> <span class="search-terms-term">hip-hop php under windows</span> <span class="search-terms-term">hiphop compiler</span> <span class="search-terms-term">hiphop for php &quot;on windows&quot; apche</span> <span class="search-terms-term">hiphop for php mac</span> <span class="search-terms-term">hiphop for php on mac</span> <span class="search-terms-term">hiphop for php setup</span> <span class="search-terms-term">hiphop for windows</span> <span class="search-terms-term">hiphop php compiler download</span> <span class="search-terms-term">hiphop php compiler window</span> <span class="search-terms-term">hiphop php mac</span> <span class="search-terms-term">hiphop php on mac</span> <span class="search-terms-term">hiphop php windows</span> <span class="search-terms-term">hiphop windows</span> <span class="search-terms-term">hiphop-php under mac</span> <span class="search-terms-term">hiphop-php windows</span> <span class="search-terms-term">hiphop-php wordpress</span> <span class="search-terms-term">how hiphop php works</span> <span class="search-terms-term">installing hip hop php on dreamhost</span> <span class="search-terms-term">is facebook hiphop is available for windows</span> <span class="search-terms-term">mac &quot;hiphop for php&quot;</span> <span class="search-terms-term">php calling compiled hiphop</span> <span class="search-terms-term">php hip hop + windows</span> <span class="search-terms-term">php hip hop for windows</span> <span class="search-terms-term">php hiphop</span> <span class="search-terms-term">php hiphop +windows</span> <span class="search-terms-term">php hiphop compiler windows</span> <span class="search-terms-term">php hiphop windows</span> <span class="search-terms-term">quick download hiphop php</span> <span class="search-terms-term">roadsend php compiler windows</span> <span class="search-terms-term">windows hphp hiphop</span> <span class="search-terms-term">wordpress blogs</span> 

<p>Related posts:<ol><li><a href='http://digitivity.org/165/how-facebook-runs-php-and-mysql' rel='bookmark' title='Permanent Link: How Facebook Runs PHP and MySQL'>How Facebook Runs PHP and MySQL</a></li>
<li><a href='http://digitivity.org/905/the-origins-of-facebook-hacked-e-mails-and-privacy' rel='bookmark' title='Permanent Link: The Origins of Facebook, Hacked E-mails, and Privacy'>The Origins of Facebook, Hacked E-mails, and Privacy</a></li>
<li><a href='http://digitivity.org/750/back-up-social-media-gmail-facebook-wordpress-and-other-cloud-services-with-backupify' rel='bookmark' title='Permanent Link: Back Up Gmail, Facebook, WordPress, and Other Social Media with Backupify'>Back Up Gmail, Facebook, WordPress, and Other Social Media with Backupify</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://digitivity.org/771/facebook-announces-a-better-faster-php-hiphop-php-c-plus-plus-compiler/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How Facebook Runs PHP and MySQL</title>
		<link>http://digitivity.org/165/how-facebook-runs-php-and-mysql</link>
		<comments>http://digitivity.org/165/how-facebook-runs-php-and-mysql#comments</comments>
		<pubDate>Sun, 12 Apr 2009 12:31:52 +0000</pubDate>
		<dc:creator>Digitivity</dc:creator>
				<category><![CDATA[Developer]]></category>
		<category><![CDATA[Web/Software Development]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[high availability]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[scaling]]></category>

		<guid isPermaLink="false">http://www.digitivity.org/?p=165</guid>
		<description><![CDATA[I was surprised to know that Facebook runs on PHP.
It also uses C++ and Java in places, but it&#8217;s the fact that it uses the little scripting language that could (PHP) is what is interesting. Aditya Agarwal of Facebook describes how the social networking giant does it in a presentation at QCon SF 2008.
The story [...]


Related posts:<ol><li><a href='http://digitivity.org/771/facebook-announces-a-better-faster-php-hiphop-php-c-plus-plus-compiler' rel='bookmark' title='Permanent Link: Facebook Announces a Better, Faster PHP: HipHop PHP'>Facebook Announces a Better, Faster PHP: HipHop PHP</a></li>
<li><a href='http://digitivity.org/905/the-origins-of-facebook-hacked-e-mails-and-privacy' rel='bookmark' title='Permanent Link: The Origins of Facebook, Hacked E-mails, and Privacy'>The Origins of Facebook, Hacked E-mails, and Privacy</a></li>
<li><a href='http://digitivity.org/944/facebook-surpasses-google-as-number-one-site-on-internet-what-does-it-mean' rel='bookmark' title='Permanent Link: Facebook Surpasses Google: What Does It Mean?'>Facebook Surpasses Google: What Does It Mean?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I was surprised to know that Facebook runs on PHP.</p>
<p>It also uses C++ and Java in places, but it&#8217;s the fact that it uses the little scripting language that could (PHP) is what is interesting. Aditya Agarwal of Facebook describes how the social networking giant does it in <a href="http://www.infoq.com/presentations/Facebook-Software-Stack">a presentation at QCon SF 2008</a>.</p>
<p>The story is being discussed on Slashdot <a href="http://linux.slashdot.org/article.pl?sid=09/04/11/1142246">here</a>.</p>
<h2>Top Incoming Search Terms</h2><span class="search-terms-term">&ldquo;leave a reply&rdquo;+&ldquo;hiphop&rdquo; site:org</span> <span class="search-terms-term">compiling hip hop php on a mac</span> <span class="search-terms-term">compiling hip hop php under windows</span> <span class="search-terms-term">compiling hiphop on windows</span> <span class="search-terms-term">compiling wordpress hiphop</span> <span class="search-terms-term">download hiphop php compiler</span> <span class="search-terms-term">dreamhost hiphop php</span> <span class="search-terms-term">facebook announce compile php</span> <span class="search-terms-term">facebook hip hop compiler</span> <span class="search-terms-term">facebook hip hop windows</span> <span class="search-terms-term">facebook hiphop for windows</span> <span class="search-terms-term">facebook hiphop wordpress</span> <span class="search-terms-term">facebook runs on php</span> <span class="search-terms-term">hip hop compiler</span> <span class="search-terms-term">hip hop php</span> <span class="search-terms-term">hip hop php on windows</span> <span class="search-terms-term">hip-hop php under windows</span> <span class="search-terms-term">hiphop compiler</span> <span class="search-terms-term">hiphop for php &quot;on windows&quot; apche</span> <span class="search-terms-term">hiphop for php mac</span> <span class="search-terms-term">hiphop for php on mac</span> <span class="search-terms-term">hiphop for php setup</span> <span class="search-terms-term">hiphop for windows</span> <span class="search-terms-term">hiphop php compiler download</span> <span class="search-terms-term">hiphop php compiler window</span> <span class="search-terms-term">hiphop php mac</span> <span class="search-terms-term">hiphop php on mac</span> <span class="search-terms-term">hiphop php windows</span> <span class="search-terms-term">hiphop windows</span> <span class="search-terms-term">hiphop-php under mac</span> <span class="search-terms-term">hiphop-php windows</span> <span class="search-terms-term">hiphop-php wordpress</span> <span class="search-terms-term">how hiphop php works</span> <span class="search-terms-term">installing hip hop php on dreamhost</span> <span class="search-terms-term">is facebook hiphop is available for windows</span> <span class="search-terms-term">mac &quot;hiphop for php&quot;</span> <span class="search-terms-term">php calling compiled hiphop</span> <span class="search-terms-term">php hip hop + windows</span> <span class="search-terms-term">php hip hop for windows</span> <span class="search-terms-term">php hiphop</span> <span class="search-terms-term">php hiphop +windows</span> <span class="search-terms-term">php hiphop compiler windows</span> <span class="search-terms-term">php hiphop windows</span> <span class="search-terms-term">quick download hiphop php</span> <span class="search-terms-term">roadsend php compiler windows</span> <span class="search-terms-term">windows hphp hiphop</span> <span class="search-terms-term">wordpress blogs</span> 

<p>Related posts:<ol><li><a href='http://digitivity.org/771/facebook-announces-a-better-faster-php-hiphop-php-c-plus-plus-compiler' rel='bookmark' title='Permanent Link: Facebook Announces a Better, Faster PHP: HipHop PHP'>Facebook Announces a Better, Faster PHP: HipHop PHP</a></li>
<li><a href='http://digitivity.org/905/the-origins-of-facebook-hacked-e-mails-and-privacy' rel='bookmark' title='Permanent Link: The Origins of Facebook, Hacked E-mails, and Privacy'>The Origins of Facebook, Hacked E-mails, and Privacy</a></li>
<li><a href='http://digitivity.org/944/facebook-surpasses-google-as-number-one-site-on-internet-what-does-it-mean' rel='bookmark' title='Permanent Link: Facebook Surpasses Google: What Does It Mean?'>Facebook Surpasses Google: What Does It Mean?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://digitivity.org/165/how-facebook-runs-php-and-mysql/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
