<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sat, 18 May 2013 12:46:00 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPClasses.org: Lately in PHP, Episode 30 - Will PHP 6 feature a JIT compiler?]]></title>
      <guid>http://www.phpdeveloper.org/news/18866</guid>
      <link>http://www.phpdeveloper.org/news/18866</link>
      <description><![CDATA[<p>
On the PHPClasses.org site they've posted the latest episode of their "Lately in PHP" podcast series - <a href="http://www.phpclasses.org/blog/post/196-Will-PHP-6-feature-a-JIT-compiler-Lately-in-PHP-podcast-episode-30.html">Episode #30</a>, "Will PHP6 Feature a JIT compiler?"
</p>
<blockquote>
Now that Facebook made some progress with their PHP HipHop VM JIT compiler engine, some PHP core developers are considering having also a JIT compiler implementation of the official implementation based on LLVM, eventually in PHP 6. [...] They also commented on the first alpha release of PHP 5.5.0, proposals for having pure interfaces in the PHP core, the Facebook PHP JIT compiler enhancements, and the new system of levels and missions of the PHPClasses and JSClasses sites.
</blockquote>
<p>
You can listen to this latest episode either through their <a href="http://www.phpclasses.org/blog/post/196-Will-PHP-6-feature-a-JIT-compiler-Lately-in-PHP-podcast-episode-30.html">in-page player</a>, by <a href="http://www.phpclasses.org/blog/post/196/file/153/name/Lately-In-PHP-30.mp3">downloading the mp3</a> or by <a href="http://www.phpclasses.org/blog/category/podcast/post/latest.rss">subscribing to their feed</a>. You can also <a href="http://youtu.be/dpFLgVcYBdI">watch the video</a> of the recording as well.
</p>]]></description>
      <pubDate>Mon, 10 Dec 2012 10:50:28 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Sankuru Blog: A pluggable compiler and virtual machine in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17371</guid>
      <link>http://www.phpdeveloper.org/news/17371</link>
      <description><![CDATA[<p>
On the Sankuru blog today the next post in the series about creating a compiler in PHP has been posted. In <a href="http://sankuru.biz/blog/14-a-pluggable-compiler-and-virtual-machine-in-php-dogfood-yourself-with-your-own-plugins">this latest tutorial</a> he shows how to set up a plugin architecture for the compiler that allows you to quickly and easily extend it beyond its base functionality.
</p>
<blockquote>
A plugin architecture allows multiple developers to work on the same application and let yet another person assemble their work later on. It allows the plugin developer to understand just his plugin API without having to understand all the details of the entire application.
</blockquote>
<p>
He describes a few platforms that already have the concept of plugins including <a href="http://joomla.org/">Joomla</a>, <a href="http://www.mediawiki.org/">Mediawiki</a> and <a href="http://www.sugarcrm.com/crm/">SugarCRM</a>. He explains what a plugin architecture should be and what it shouldn't be. All of this is his first steps towards building a plugin-enabled compiler and virtual machine in PHP.
</p>]]></description>
      <pubDate>Tue, 10 Jan 2012 11:53:15 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Sankuru Blog: Adding support for if/while/do while, to a simple compiler & virtual machine in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17346</guid>
      <link>http://www.phpdeveloper.org/news/17346</link>
      <description><![CDATA[<p>
Improving on his <a href="http://phpdeveloper.org/news/17327">last post</a> about creating a bytecode compiler in PHP, the Sankuru blog has a new post in the series looking at extending the basic compiler to <a href="http://sankuru.biz/blog/13-adding-support-for-if-while-and-do-while-to-a-simple-compiler-and-virtual-machine-written-in-php">add support for if/while and do while</a> logic.
</p>
<blockquote>
In order to obtain a <a href="http://en.wikipedia.org/wiki/Turing_completeness">turing-complete</a> programming language, that is, a language in which we can implement and execute any arbitrary algorithm, that is, that other turing-complete machines can execute too, we now need to add a way of (conditionally) branching, that is, the IF statement, and at least one way of repeating statements, that is the WHILE or the DO WHILE statements.
</blockquote>
<p>
He includes a simple TL-based script as an end goal for the compiler to be able to execute and shows how to add rules for it to the lexer/parser. Rules for the "if" are relatively simple, but there's a hitch in dealing with embedded "while" statements he had to work around. The post ends with the bytecode results for the sample program and the resulting output from the compiled versions execution.
</p>]]></description>
      <pubDate>Wed, 04 Jan 2012 11:40:22 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Sankuru Blog: A simple bytecode compiler with virtual machine, written in Php, for the EL language]]></title>
      <guid>http://www.phpdeveloper.org/news/17327</guid>
      <link>http://www.phpdeveloper.org/news/17327</link>
      <description><![CDATA[<p>
On the Sankuru blog there's a recent post looking at the construction of <a href="http://sankuru.biz/blog/6-a-simple-bytecode-compiler-with-virtual-machine-written-in-php-for-the-el-language">a simple bytecode compiler with a virtual machine</a> as written in PHP (for <a href="http://docs.oracle.com/javaee/1.4/tutorial/doc/JSPIntro7.html">Expression Language</a>).
</p>
<blockquote>
In my previous blog posts, I demonstrated how we can use the builtin PCRE library, to create a lexer in Php. I also showed how to use Bison-generated LALR1 parser tables in Php. In this blog post, I will re-use these lexing and parsing facilities to compile EL programs from within Php.
</blockquote>
<p>
He uses his lexer/parser (<a href="http://sankuru.biz/category/3-compiler-construction?download=10:bytecode-compiler-and-virtual-machine-in-php-for-a-simple-expression-language">available for download</a>) in an example program that outputs some values and does some simple mathematical operations. There's sections detailing the Bison grammar used, execution stacks, callbacks and the bytecode it produces.
</p>]]></description>
      <pubDate>Fri, 30 Dec 2011 11:06:36 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Swan's Blog: Why is PHP 5.3 on Windows faster than previous PHP versions?]]></title>
      <guid>http://www.phpdeveloper.org/news/16987</guid>
      <link>http://www.phpdeveloper.org/news/16987</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Brian Swan</i> explains why the latest versions of PHP (the 5.3.x series) are <a href="http://blogs.msdn.com/b/brian_swan/archive/2011/10/12/why-is-php-5-3-on-windows-faster-than-previous-php-versions.aspx">faster now on Windows</a> than some previous versions have been. (Hint: updated technology can work wonders sometimes)
</p>
<blockquote>
[Rasmus Lerdorf recently said at a <a href="http://www.meetup.com/php-49/">Seattle meetup</a>] "If you aren't running PHP 5.3 on Windows, you're lucky…because you have a 40% performance boost coming." He clarified this by saying that, with some help from Microsoft, improvements were made in PHP 5.3 that led to a 40% performance improvement of PHP on Windows. Because he didn't go into the details of why this performance boost was realized, I got questions in email the next day asking about why.
</blockquote>
<p>
The information in a <a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-33-78-metablogapi/8802.image_5F00_511FB339.png">borrowed slide</a> (from a presentation by <a href="http://twitter.com/#!/pierrejoye">Pierre Joye</a>) shows what the differences between the versions are - things like the use of a more modern compiler (VC9 vs VC6), calls to the Win32 API directly and better library management.
</p>]]></description>
      <pubDate>Thu, 13 Oct 2011 08:42:12 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[SitePoint PHP Blog: How to Roll Your Own JavaScript Compressor with PHP and the Closure Compiler]]></title>
      <guid>http://www.phpdeveloper.org/news/15051</guid>
      <link>http://www.phpdeveloper.org/news/15051</link>
      <description><![CDATA[<p>
On the SitePoint PHP blog today there's <a href="http://www.sitepoint.com/blogs/2010/08/31/compress-javascript-with-php/">a quick new post</a> showing you how to create a Javascript compressor tool with PHP that uses the <a href="http://closure-compiler.appspot.com/home">Closure Compiler</a> from Google.
</p>
<blockquote>
In my previous post, I discussed the <a href="http://www.sitepoint.com/blogs/2010/08/30/compress-javascript-closure-compiler-rest-api/">Closure Compiler's REST API</a>. In this article, we'll develop a small PHP program that shows how the API can be used to compress JavaScript code whenever you need it.
</blockquote>
<p>
He shows how to compress three "script" tags down into one that defines multiple files for the engine to grab and compress. This is passed into a PHP file that <a href="http://php.net/file_get_contents">grabs the file</a> and passes the data off to the Closure Compiler for handling (via curl). The result is then passed back and served up with a content type of "text/javascript" back to the browser.
</p>]]></description>
      <pubDate>Tue, 31 Aug 2010 12:51:08 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Community News: Facebook Releases HipHop for PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/13955</guid>
      <link>http://www.phpdeveloper.org/news/13955</link>
      <description><![CDATA[<p>
Facebook has made their <a href="http://developers.facebook.com/news.php?blog=1&story=358">official announcement</a> about their secretive PHP project today and have scheduled an event for them to give the world more information on the project.
</p>
<blockquote>
Today I'm excited to share the project a small team of amazing people and I have been working on for the past two years; HipHop for PHP. With HipHop we've reduced the CPU usage on our Web servers on average by about fifty percent, depending on the page. Less CPU means fewer servers, which means less overhead. This project has had a tremendous impact on Facebook. We feel the Web at large can benefit from HipHop, so we are releasing it as open source this evening in hope that it brings a new focus toward scaling large complex websites with PHP.
</blockquote>
<p>
<a href="http://developers.facebook.com/news.php?blog=1&story=358">The post</a> elaborates a bit more on what the tool is (not really a compiler, more of an optimizer) and why they decided to go this direction. There's a bit of description on how the tool works and how the transformation happens.
</p>
<p>
Stay tuned to <a href="http://developers.facebook.com/news.php?blog=1&story=358">this post</a> around 7:30pm Pacific time for more information.
</p>]]></description>
      <pubDate>Tue, 02 Feb 2010 12:30:39 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[ReadWriteWeb.com: CONFIRMED: Facebook Gets Faster, Debuts Homegrown PHP Compiler]]></title>
      <guid>http://www.phpdeveloper.org/news/13951</guid>
      <link>http://www.phpdeveloper.org/news/13951</link>
      <description><![CDATA[<p>
If you've been following along with some of <a href="http://www.phpdeveloper.org/news/13941">the articles</a> about the compiler Facebook is developing for PHP, you might want to check out <a href="http://www.readwriteweb.com/archives/facebook_gets_faster_debuts_homegrown_php_compiler.php">these comments</a> from ReadWriteWeb.com (by <i>Mike Melanson</i>) with more from his point of view.
</p>
<blockquote>
According to our sources, Facebook has been working on a PHP compiler that will increase speed by around 80% and offer a just-in-time (JIT) compilation engine that will offer a number of advantages. The project is very similar to Google's <a href="http://arstechnica.com/open-source/news/2009/03/google-launches-project-to-boost-python-performance-by-5x.ars">Unladen Swallow</a> project, which rebuilt the Python compiler, boosting the speed fivefold and opening the door for multi-language integration.
</blockquote>
<p>
Included are also some comments from <a href="http://twitter.com/rcrowley">Richard Crowley</a> about what Facebook could be releasing, a compiler that would still allow PHP to remain interpreted but provide the speed of being compiled. Some of the <A href="http://www.readwriteweb.com/archives/facebook_gets_faster_debuts_homegrown_php_compiler.php#comments">comments</a> on the post wonder how something like this compiler compares to an opcode cache and doubts on whether it will end up being open sourced at all.
</p>
<p>
You can also get another opinion on what will be released in <a href="http://www.allfacebook.com/2010/02/facebook-prepares-to-open-source-a-new-php/">this article</a> from the All Facebook blog. They reinforce that the announcement will come today and how much potential something like this could have to change what PHP could become.
</p>]]></description>
      <pubDate>Tue, 02 Feb 2010 10:45:12 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Software Development Times: Facebook rewrites PHP runtime]]></title>
      <guid>http://www.phpdeveloper.org/news/13941</guid>
      <link>http://www.phpdeveloper.org/news/13941</link>
      <description><![CDATA[<p>
According to <a href="http://www.sdtimes.com/blog/post/2010/01/30/Facebook-rewrites-PHP-runtime.aspx">this new article</a> from the Software Development Times <a href="http://facebook.com">Facebook</a> has rewritten the PHP runtime from scratch and will be releasing it soon as an open source project.
</p>
<blockquote>
So, why has Facebook rewritten the PHP runtime? Because PHP is obviously too slow for their tastes. A few years ago, I had a coffee meeting with some of the folks from Zend. When they asked what I had been hearing about PHP in the market from my sources, I hemmed and hawed, then told them that I had heard people complaining about how slow PHP was.
</blockquote>
<p>
Other sources suggest the release won't be a full runtime but instead a sort of compiler for PHP applications including <a href="http://therumpus.net/2010/01/conversations-about-the-internet-5-anonymous-facebook-employee/?full=yes">an interview</a> with a Facebook employee who drops a hint about their future plans for the language.
</p>]]></description>
      <pubDate>Mon, 01 Feb 2010 08:09:52 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Derick Rethans' Blog: PHP's two-pass compiler]]></title>
      <guid>http://www.phpdeveloper.org/news/11833</guid>
      <link>http://www.phpdeveloper.org/news/11833</link>
      <description><![CDATA[<p>
While working on an issue with debugging a script of his via XDebug, <i>Derick Rethans</i> was <a href="http://derickrethans.nl/phps_twopass_compiler.php">reminded of something</a> that is an integral part of the PHP language - its two phase compiler.
</p>
<blockquote>
During the first pass, it will find out to which opcode it needs to jump in the jump instructions. However, the PHP engine (and Xdebug) expects a memory address to jump to while executing your script. In the second pass, the compiler will then go over the generated opcodes and calculate the memory address to jump to from the jumps to opcode numbers. 
</blockquote>
<p>
Because of the way that XDebug was handling the checks (with the user-defined error handler) and how the opcodes inside of PHP are handled, the user-defined handler happened in between the first and second phases and the latter run couldn't find the resources it was looking for, thus the crash.
</p>]]></description>
      <pubDate>Wed, 28 Jan 2009 12:06:34 -0600</pubDate>
    </item>
  </channel>
</rss>
