<?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>Thu, 20 Jun 2013 01:01:21 -0500</pubDate>
    <ttl>30</ttl>
    <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[Brandon Savage's Blog: Of Lies, Damned Lies, and Benchmarks]]></title>
      <guid>http://www.phpdeveloper.org/news/13034</guid>
      <link>http://www.phpdeveloper.org/news/13034</link>
      <description><![CDATA[<p>
<i>Brandon Savage</i> has <a href="http://www.brandonsavage.net/of-lies-damned-lies-and-benchmarks/">posted a response</a> to a recent set of <a href="http://misfitgeek.com/blog/aspnet/php-versus-asp-net-ndash-windows-versus-linux-ndash-who-rsquo-s-the-fastest/">benchmarks</a> as run comparing ASP.NET and PHP's processing speeds. 
</p>
<blockquote>
But benchmarks, for all their decision-making aid, fail under the best of circumstances for one simple reason: they're not real life. Never more is this true than in <a href="http://misfitgeek.com/blog/aspnet/php-versus-asp-net-ndash-windows-versus-linux-ndash-who-rsquo-s-the-fastest/">Joe Stagner's</a> blog post on whether Windows or Linux, and PHP or ASP was faster. [...] Benchmarks come loaded with all sorts of problems. It doesn't matter if it's Microsoft doing them or Apple doing them; they don't mimic real-world conditions, and any number of factors affect how the benchmarks are rendered.
</blockquote>
<p>
Keeping these things in mind, <i>Brandon</i> looks at some of the issues he found with how the benchamrks were run, the largest of which was comparing the ASP.NET results (with byte code caching) to a PHP install without APC enabled. 
</p>]]></description>
      <pubDate>Wed, 12 Aug 2009 12:28:44 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Lukas Smith's Blog: Chatting with Rasmus (part one)]]></title>
      <guid>http://www.phpdeveloper.org/news/9884</guid>
      <link>http://www.phpdeveloper.org/news/9884</link>
      <description><![CDATA[<p>
<i>Lukas Smith</i> got a chance to <a href="http://pooteeweet.org/blog/0/1038#m1038">catch up with Rasmus Lerdorf</a> (and others in #php.pecl) and "talk shop" about topics including handling large libraries and maxclients settings.
</p>
<blockquote>
In this first post I will provide a link and some commentary on Rasmus's <a href="http://pooteeweet.org/public/doctrine.txt">points regarding Doctrine</a> (note I left independent chatter in the log in order to not have any chance of me filtering the content, but there is very little of that so I hope the discussion is still easy enough to follow).
</blockquote>
<p>
<li>Lukas</i> <a href="http://pooteeweet.org/blog/0/1038#m1038">introduces</a> Doctrine briefly (what it does) along with some general thoughts on ORMs and making code a bit more bye code cache friendly.
</p>]]></description>
      <pubDate>Mon, 31 Mar 2008 13:58:08 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Joshua Eichorn's Blog: PHP Running on Java]]></title>
      <guid>http://www.phpdeveloper.org/news/7430</guid>
      <link>http://www.phpdeveloper.org/news/7430</link>
      <description><![CDATA[<p>
<i>Joshua Eichorn</i> <a href="http://blog.joshuaeichorn.com/archives/2007/03/13/php-running-on-java/">points out</a> an interesting project in a new post to his blog today - <a href="http://quercus.caucho.com/">quercus</a>.
</p>
<blockquote>
I found an interesting project, <a href="http://quercus.caucho.com/">quercus</a> that compiles PHP to Java Bytecode allowing it to run ontop of the Java Resin Application Server. It has a couple neat features, one being PHP6 compatible unicode support, the other being easy integration between Java and PHP code.
</blockquote>
<p>
He <a href="http://blog.joshuaeichorn.com/archives/2007/03/13/php-running-on-java/">gave it a shot</a> and notes that the performance seems decent and allows you to compensate for some of the differences in the PHP API it supports and what you're using via a Java class. According to their site:
</p>
<blockquote>
Quercus is Caucho Technology's 100% Java implementation of PHP 5 released under the Open Source GPL license. Quercus comes with many PHP modules and extensions like PDF, PDO, MySQL, and JSON. Quercus allows for tight integration of Java services with PHP scripts, so using PHP with JMS or Grails is a quick and painless endeavor.
</blockquote>
<p>
It includes several extensions too, including the JSON library, APC, MySQL and Oracle support, and PDF functionality. Check out their <a href="http://quercus.caucho.com/quercus-3.1/doc/quercus-getting-started.xtp">Getting Started</a> guide, <a href="http://quercus.caucho.com/quercus-3.1/index.xtp">documentation</a>, or their <a href="http://wiki.caucho.com/">wiki</a> for more information.
</p>]]></description>
      <pubDate>Wed, 14 Mar 2007 10:32:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Lukas Smith's Blog: Remember: be nice to byte code caches]]></title>
      <guid>http://www.phpdeveloper.org/news/6824</guid>
      <link>http://www.phpdeveloper.org/news/6824</link>
      <description><![CDATA[<p>
In <a href="http://pooteeweet.org/blog/538">a new post</a> on his blog, <i>Lukas Smith</i> warns developers working with autoload and byte code caches that things may not be as speedy as they might seem.
</p>
<blockquote>
While it seems kind of nice one must be weary of the idea that they speed up your code. If you are running a byte code cache (which anyone who cares about performance of course does) you will get quite the opposite.
</blockquote>
<p>
He <a href="http://pooteeweet.org/blog/538">includes a quote</a> from an IRC log with <i>Rasmus Lerdorf</i> as to the reason why. Mainly, it has to do with the fact that autoload is runtime dependent as opposed to the byte codes which are handled and cached when working with apc.
</p>
<p>
So, what does this mean for performance? If you really want to squeeze those few extra bits of time out of the execution of your scripts, static includes are the way to go.
</p>]]></description>
      <pubDate>Tue, 05 Dec 2006 09:14:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Alan Knowles' Blog: Recovering encoded php files]]></title>
      <guid>http://www.phpdeveloper.org/news/5011</guid>
      <link>http://www.phpdeveloper.org/news/5011</link>
      <description><![CDATA[<i>Alan Knowles</i> has posted <a href="http://www.akbkhome.com/blog.php/View/117/Recovering_encoded_php_files.html">this post</a> about some of the thinks that came from <a href="http://www.phpdeveloper.org/news/3841">a previous post</a> he did concerning a tool for encrypting PHP scripts. In this new post, however, he mentions something on the other side of the equation - a "PHP recovery tool".
<p>
<quote>
<i>
Someone posted a comment on a post I did a while back about a <a href="http://www.akbkhome.com/blog.php/View/105/Code+encryption+%3D+funny+solutions.html">product that was supposed to provide encryption on PHP scripts</a>. (That blog post was probably my most controversial, as the author of the application send me an email asking me to contact his lawyers....)
<p>
The post this time was about another magic cure, php recovery, a new web site claiming (or appearing to) sell a product to recover php source code after it has been encrypted. Well, considering my last post, using plain old PHP methods, this is perfectly feasible. However they also claim to restore your code if it was encrypted with ioncube and Zend's encoders, which, not having tried them, but knowing the author of both products reasonably well, I have a few doubts about.
</i>
</quote>
<p>
He <a href="http://www.akbkhome.com/blog.php/View/117/Recovering_encoded_php_files.html">mentions</a> what most of the encoders on the market do to accomplish their protection (the translation into bytecodes) and what some of the potential problems with converting the bytecodes back to PHP would be. There's on piece of software he mentions ("Derick's VLD"), but that's only really useful because it dumps back the opcodes in a readable format.]]></description>
      <pubDate>Mon, 20 Mar 2006 07:02:53 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[SitePoint PHP Blog: PHP to Java bytecode]]></title>
      <guid>http://www.phpdeveloper.org/news/4548</guid>
      <link>http://www.phpdeveloper.org/news/4548</link>
      <description><![CDATA[On the SitePoint PHP blog today, <i>Harry Fuecks</i> <a href="http://www.sitepoint.com/blogs/2005/12/21/php-to-java-bytecode/">talks about</a> some of the options to integrate PHP with Java - the Caucho updates specifically.
<p>
<quote>
<i>
From <a href="http://www.theserverside.com/news/thread.tss?thread_id=38144">this post</a> on <a href="http://www.theserverside.com/">the server side</a> it seems <a href="http://www.caucho.com/">Caucho</a> have added PHP support to their Resin Java App server.
<p>
There are a number <a href="http://www.php.net/java">ways</a> to <a href="http://php-java-bridge.sourceforge.net/">integrate</a> with <a href="http://wiki.apache.org/tomcat/UsingPhp">Java</a>, by which I mean PHP-the C version.
<p>
What's interesting about what Caucho seem to have done is, rather than integrate with PHP-C, they've written their own parser for PHP scripts in Java, from which they generate Java byte code for execution. I say "seem" because I've only glanced at the <a href="http://www.caucho.com/download/index.xtp">source</a> and found a convincing-looking PHP parser in there.
</i>
</quote>
He also points out <a href="http://wiki.caucho.com/Category:PHP">a wiki entry</a> with some more information on it...]]></description>
      <pubDate>Thu, 22 Dec 2005 07:26:29 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPEverywhere: PHP Compilers]]></title>
      <guid>http://www.phpdeveloper.org/news/4541</guid>
      <link>http://www.phpdeveloper.org/news/4541</link>
      <description><![CDATA[<i>John Lim</i> has a new post on PHPEverywhere today with a look at a listing of a few <a href="http://phplens.com/phpeverywhere/?q=node/view/223">PHP compilers</a> that are up and coming.
<p>
<quote>
<i>
The number of implementations of PHP continue to rise and rise. [...] I am excited about all these implementations. Most computationally intensive compiler benchmarks have shown a 5-10 times speedup over mod_php. Perhaps it is only a matter of time before we see a JIT compiler for PHP to Intel opcodes, built into mod_php...
</i>
</quote>
<p>
Some of the ones mentioned include:
<ul>
<li>Caucho's <a href="http://www.theserverside.com/news/thread.tss?thread_id=38144">PHP5 to Java bytecode compiler</a>
<li><a href="http://www.roadsend.com/home/index.php?SMC=1&pageID=press">Pint</a>, a PHP to Parrot compiler
<li><a href="http://www.roadsend.com/home/index.php?SMC=1&pageID=press">Roadsend</a>, a commercial PHP to binary compiler
</ul>
<p>
He <a href="http://phplens.com/phpeverywhere/?q=node/view/223">also speculates</a> on the things that might be causing a slow uptake of these compiler technologies, things like: "is PHP fast enough?" and "Not all PHP extensions/libraries are available on all systems"...]]></description>
      <pubDate>Thu, 22 Dec 2005 06:25:42 -0600</pubDate>
    </item>
  </channel>
</rss>
