<?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>Mon, 20 May 2013 04:30:04 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Kevin Schroeder: Would this be a dumb idea for PHP core?]]></title>
      <guid>http://www.phpdeveloper.org/news/19200</guid>
      <link>http://www.phpdeveloper.org/news/19200</link>
      <description><![CDATA[<p>
In <a href="http://www.eschrade.com/page/would-this-be-a-dumb-idea-for-php-core">this new post</a> to his site <i>Kevin Schroeder</i> thinks out loud and wonders if an idea of his is "a dumb idea" to be included into the PHP core - engine state caching.
</p>
<blockquote>
 I was consulting and I would see significant server resources consumed by bootstrapping the apps.  Loading config files, loading dependent classes, setting up dependencies, initializing ACL's, and the list goes on and on. One of the ways to negate the effect would be to cache a bootstrap object and then pull that object from the cache at the start of the request.  However, the problem is that unserialization can actually end up taking more time than the bootstrap process itself.
</blockquote>
<p>
He wonders if, after the initial bootstrapping happened, a method could be called (his example is "init_engine_state") that would cache the Zend Engine's current state and pass that to a callback function. This would cache everything - objects, variables, classes, etc - all pre-interpreted into memory and make them easy to reuse on future executions. What do you think? <a href="http://www.eschrade.com/page/would-this-be-a-dumb-idea-for-php-core">Share your thoughts</a> in the comments of the post.
</p>]]></description>
      <pubDate>Tue, 19 Feb 2013 09:26:55 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Abhinav Singh's Blog: PHP tokens & opcodes: 3 useful extensions for understanding the Zend Engine]]></title>
      <guid>http://www.phpdeveloper.org/news/13584</guid>
      <link>http://www.phpdeveloper.org/news/13584</link>
      <description><![CDATA[<p>
<i>Abhinav Singh</i> has <a href="http://abhinavsingh.com/blog/2009/11/php-tokens-and-opcodes-3-useful-extensions-for-understanding-the-working-of-zend-engine/">a recent post</a> to his blog looking at three extensions that you can use to help understand the inner workings of the core Zend Engine.
</p>
<blockquote>
"PHP tokens and opcodes" - When a PHP script is executed it goes through a number of processes, before the final result is displayed. These processes are namely: Lexing, Parsing, Compiling and Executing. In this blog post, I will walk you through all these processes with a sample example. In the end I will list some useful PHP extensions, which can be used to analyze results of every intermediate process.
</blockquote>
<p>
He touches on the steps the average PHP script takes in its processing - lexing, parsing/compiling and the actual execution of the opcodes. The <a href="http://www.php.net/manual/en/ref.tokenizer.php">tokenizer</a>, <a href="http://www.php.net/manual/en/ref.parsekit.php">parsekit</a> and <a href="http://derickrethans.nl/vld.php">VLD</a> (Vulcan Logic Disassembler) extensions can help you get down into the nuts and bolts of the language and the engine that makes it work.
</p>]]></description>
      <pubDate>Tue, 24 Nov 2009 11:32:31 -0600</pubDate>
    </item>
  </channel>
</rss>
