<?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>Fri, 24 May 2013 17:24:05 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Matt Knight's Blog: Optimising Zend_Config]]></title>
      <guid>http://www.phpdeveloper.org/news/16557</guid>
      <link>http://www.phpdeveloper.org/news/16557</link>
      <description><![CDATA[<p>
<i>Matt Knight</i> has a recent post looking at a specific part of the Zend Framework, the Zend_Config component, and how it's overhead can be reduced (and somewhat replaced) <a href="http://www.matt-knight.co.uk/2011/optimising-zend-config/">using a few lines of PHP 5.3-specific code</a>.
</p>
<blockquote>
One such limitation that I've recently seen is the performance of Zend_Config. This class underpins the mechanism by which developers provide configuration to the application, and all this config is passed around in the form of Zend_Config objects. [...] For the purposes of this article, I'm referring specifically to config INI files, using Zend_Config_Ini to parse. This is a very common format for Zend applications to use - it is familiar to developers and infrastructure support teams - and is the case where the performance issues become apparent
</blockquote>
<p>
He talks about parsing ini files and the complications that can come with the Zend Framework method of parsing them - conversion to objects via a recursive method, merging data from different sections and the overhead toArray can cause. He shows an alternative that uses <a href="http://php.net/array_replace_recursive">array_replace_recursive</a> to handle the parsing and a class version that offers backwards compatibility with the Zend_Config structure. He claims to have seen a sixty percent jump in performance using these methods over the Zend Framework's defaults.
</p>]]></description>
      <pubDate>Wed, 06 Jul 2011 10:39:01 -0500</pubDate>
    </item>
  </channel>
</rss>
