<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Muranosoft Blog - PHP</title>
    <link>http://www.muranosoft.com/Outsourcingblog/</link>
    <description>Coding etc</description>
    <language>en-us</language>
    <copyright>Murano Software</copyright>
    <lastBuildDate>Thu, 18 Feb 2010 17:23:00 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>valerie.sinitskaya@muranosoft.com</managingEditor>
    <webMaster>valerie.sinitskaya@muranosoft.com</webMaster>
    <item>
      <trackback:ping>http://www.muranosoft.com/Outsourcingblog/Trackback.aspx?guid=2a389637-8b5f-4f3c-9c54-425525431fbd</trackback:ping>
      <pingback:server>http://www.muranosoft.com/Outsourcingblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.muranosoft.com/Outsourcingblog/PermaLink,guid,2a389637-8b5f-4f3c-9c54-425525431fbd.aspx</pingback:target>
      <dc:creator>Muranosoft admin</dc:creator>
      <wfw:comment>http://www.muranosoft.com/Outsourcingblog/CommentView,guid,2a389637-8b5f-4f3c-9c54-425525431fbd.aspx</wfw:comment>
      <wfw:commentRss>http://www.muranosoft.com/Outsourcingblog/SyndicationService.asmx/GetEntryCommentsRss?guid=2a389637-8b5f-4f3c-9c54-425525431fbd</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <em>By Alexander, a Senior <a href="http://www.muranosoft.com/services/java.aspx">Java</a>/PHP
Developer on Murano Software’s team</em>
        </p>
        <p>
Facebook, as you may already know, is working to open source their PHP to C++ translator,
called HipHop. There is a lot of buzz about it, so I think a summary will be handy. 
</p>
        <p>
          <strong>Main points:</strong>
        </p>
        <ul>
          <li>
It's free and open source. 
</li>
          <li>
HipHop is already used by Facebook, so it's tested with their huge code base. 
</li>
          <li>
Process is: PHP → С++ → GCC → binary. 
</li>
          <li>
HipHop is not JIT. You should translate and compile all code on every deployment. 
</li>
          <li>
Binary can work as standalone server (using libevent). Also, it can work in command
line. 
</li>
          <li>
Standalone server uses one process and many threads. 
</li>
          <li>
It's not based on Zend Engine. Instead, C++ code compatible with PHP 5.2 is used. 
</li>
          <li>
Extensions are converted to thread-safe C++ (standard PHP extensions are being developed
in C). 
</li>
          <li>
Many extensions already have been converted.  These are used by Facebook. 
</li>
          <li>
If you want to use HipHop, prepare to convert additional extensions yourself. 
</li>
          <li>
Some PHP magic methods are supported, but the performance is the same as in PHP. 
</li>
        </ul>
        <p>
          <strong>No support for:</strong>
        </p>
        <ul>
          <li>
Windows. 
</li>
          <li>
PHP 5.3 (will be implemented later). 
</li>
          <li>
eval(). 
</li>
          <li>
create_function(). 
</li>
          <li>
preg_replace with /e modifier. 
</li>
          <li>
function_exists() before function declaration. 
</li>
        </ul>
        <p>
          <strong>Dynamic PHP functionality supported:</strong>
        </p>
        <ul>
          <li>
Dynamic function call including call_user_func(). 
</li>
          <li>
Dynamic methods and properties. 
</li>
          <li>
Dynamic variables, extract(). 
</li>
          <li>
Dynamic include(). 
</li>
          <li>
Redefinition of functions, classes and constants. 
</li>
          <li>
__toString(), __get(), __set(), __call(). 
</li>
        </ul>
        <p>
          <strong>Thoughts:</strong>
        </p>
        <p>
Facebook made a great tool to make their codebase run faster without rewriting it
in C or C++. They do have a reason for it, and there is no doubt they (with their
really high loads) need it. What does it mean for the rest of us? A little. All major
PHP frameworks and CMS, including <a href="http://drupal.org/">Drupal</a> and <a href="http://wordpress.org/">Wordpress</a>,
cannot be compiled by HipHop. Moreover, PHP execution itself is a bottleneck in a
very few cases, like Facebook’s, where data storage and other infrastructure is perfectly
optimized. If your application works slowly, and you aren't getting loads comparable
to Facebook’s, HipHop most likely will not help you. The problem is within the database
or algorithms used.
</p>
        <p>
          <strong>Sources used:</strong>
        </p>
        <ul>
          <li>
            <a href="http://developers.facebook.com/hiphop-php/">Official announce</a>
          </li>
          <li>
            <a href="http://github.com/facebook/hiphop-php">Source code</a>
          </li>
          <li>
            <a href="http://ilia.ws/archives/213-My-Thoughts-on-HipHop.html">My Thoughts on HipHop,
Ilia Alshanetsky</a>
          </li>
          <li>
            <a href="http://www.recessframework.org/page/notes-from-facebooks-hiphop-for-php-debut">Notes
from Facebook's HipHop for PHP Debut, Kris Jordan</a>
          </li>
          <li>
            <a href="http://blog.tabini.ca/2010/02/hiphop-what-you-need-to-know/">HipHop: What
you need to know, Marco Tabini</a>
          </li>
        </ul>
        <img width="0" height="0" src="http://www.muranosoft.com/Outsourcingblog/aggbug.ashx?id=2a389637-8b5f-4f3c-9c54-425525431fbd" />
      </body>
      <title>Facts and thoughts about HipHop</title>
      <guid isPermaLink="false">http://www.muranosoft.com/Outsourcingblog/PermaLink,guid,2a389637-8b5f-4f3c-9c54-425525431fbd.aspx</guid>
      <link>http://www.muranosoft.com/Outsourcingblog/Facts-And-Thoughts-About-HipHop.aspx</link>
      <pubDate>Thu, 18 Feb 2010 17:23:00 GMT</pubDate>
      <description>&lt;p&gt;
&lt;em&gt;By Alexander, a Senior &lt;a href="http://www.muranosoft.com/services/java.aspx"&gt;Java&lt;/a&gt;/PHP
Developer on Murano Software’s team&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
Facebook, as you may already know, is working to open source their PHP to C++ translator,
called HipHop. There is a lot of buzz about it, so I think a summary will be handy. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Main points:&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
It's free and open source. 
&lt;/li&gt;
&lt;li&gt;
HipHop is already used by Facebook, so it's tested with their huge code base. 
&lt;/li&gt;
&lt;li&gt;
Process is: PHP → С++ → GCC → binary. 
&lt;/li&gt;
&lt;li&gt;
HipHop is not JIT. You should translate and compile all code on every deployment. 
&lt;/li&gt;
&lt;li&gt;
Binary can work as standalone server (using libevent). Also, it can work in command
line. 
&lt;/li&gt;
&lt;li&gt;
Standalone server uses one process and many threads. 
&lt;/li&gt;
&lt;li&gt;
It's not based on Zend Engine. Instead, C++ code compatible with PHP 5.2 is used. 
&lt;/li&gt;
&lt;li&gt;
Extensions are converted to thread-safe C++ (standard PHP extensions are being developed
in C). 
&lt;/li&gt;
&lt;li&gt;
Many extensions already have been converted.&amp;#160; These are used by Facebook. 
&lt;/li&gt;
&lt;li&gt;
If you want to use HipHop, prepare to convert additional extensions yourself. 
&lt;/li&gt;
&lt;li&gt;
Some PHP magic methods are supported, but the performance is the same as in PHP. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;strong&gt;No support for:&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Windows. 
&lt;/li&gt;
&lt;li&gt;
PHP 5.3 (will be implemented later). 
&lt;/li&gt;
&lt;li&gt;
eval(). 
&lt;/li&gt;
&lt;li&gt;
create_function(). 
&lt;/li&gt;
&lt;li&gt;
preg_replace with /e modifier. 
&lt;/li&gt;
&lt;li&gt;
function_exists() before function declaration. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;strong&gt;Dynamic PHP functionality supported:&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Dynamic function call including call_user_func(). 
&lt;/li&gt;
&lt;li&gt;
Dynamic methods and properties. 
&lt;/li&gt;
&lt;li&gt;
Dynamic variables, extract(). 
&lt;/li&gt;
&lt;li&gt;
Dynamic include(). 
&lt;/li&gt;
&lt;li&gt;
Redefinition of functions, classes and constants. 
&lt;/li&gt;
&lt;li&gt;
__toString(), __get(), __set(), __call(). 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;strong&gt;Thoughts:&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Facebook made a great tool to make their codebase run faster without rewriting it
in C or C++. They do have a reason for it, and there is no doubt they (with their
really high loads) need it. What does it mean for the rest of us? A little. All major
PHP frameworks and CMS, including &lt;a href="http://drupal.org/"&gt;Drupal&lt;/a&gt; and &lt;a href="http://wordpress.org/"&gt;Wordpress&lt;/a&gt;,
cannot be compiled by HipHop. Moreover, PHP execution itself is a bottleneck in a
very few cases, like Facebook’s, where data storage and other infrastructure is perfectly
optimized. If your application works slowly, and you aren't getting loads comparable
to Facebook’s, HipHop most likely will not help you. The problem is within the database
or algorithms used.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Sources used:&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://developers.facebook.com/hiphop-php/"&gt;Official announce&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://github.com/facebook/hiphop-php"&gt;Source code&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://ilia.ws/archives/213-My-Thoughts-on-HipHop.html"&gt;My Thoughts on HipHop,
Ilia Alshanetsky&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://www.recessframework.org/page/notes-from-facebooks-hiphop-for-php-debut"&gt;Notes
from Facebook's HipHop for PHP Debut, Kris Jordan&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://blog.tabini.ca/2010/02/hiphop-what-you-need-to-know/"&gt;HipHop: What
you need to know, Marco Tabini&lt;/a&gt; 
&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://www.muranosoft.com/Outsourcingblog/aggbug.ashx?id=2a389637-8b5f-4f3c-9c54-425525431fbd" /&gt;</description>
      <comments>http://www.muranosoft.com/Outsourcingblog/CommentView,guid,2a389637-8b5f-4f3c-9c54-425525431fbd.aspx</comments>
      <category>PHP</category>
      <category>Software Development</category>
    </item>
  </channel>
</rss>