<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>unseen</title>
	<atom:link href="http://unseen.ws/feed/" rel="self" type="application/rss+xml" />
	<link>http://unseen.ws</link>
	<description>my inner geek's domain</description>
	<lastBuildDate>Fri, 07 May 2010 06:30:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Earndit.com</title>
		<link>http://unseen.ws/2010/05/earndit-com/</link>
		<comments>http://unseen.ws/2010/05/earndit-com/#comments</comments>
		<pubDate>Fri, 07 May 2010 05:57:37 +0000</pubDate>
		<dc:creator>hrrkii</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://unseen.ws/?p=141</guid>
		<description><![CDATA[Earndit.com is the brainchild of Andres Moran and myself.  It&#8217;s lofty goal is to promote people to live healthier lives by giving them extra motivation to be active.  I highly recommend checking out the About and Blog pages to learn more about the project.

]]></description>
			<content:encoded><![CDATA[<p>Earndit.com is the brainchild of Andres Moran and myself.  It&#8217;s lofty goal is to promote people to live healthier lives by giving them extra motivation to be active.  I highly recommend checking out the <a href="http://earndit.com/about">About </a>and <a href="http://earndit.com/blog/">Blog </a>pages to learn more about the project.</p>
<p><a href="http://unseen.ws/wp-content/uploads/2010/05/logo.png"><img class="aligncenter size-full wp-image-143" title="logo" src="http://unseen.ws/wp-content/uploads/2010/05/logo.png" alt="" width="260" height="80" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://unseen.ws/2010/05/earndit-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MossCat.com</title>
		<link>http://unseen.ws/2010/05/mosscat-com/</link>
		<comments>http://unseen.ws/2010/05/mosscat-com/#comments</comments>
		<pubDate>Fri, 07 May 2010 05:43:06 +0000</pubDate>
		<dc:creator>hrrkii</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://unseen.ws/?p=135</guid>
		<description><![CDATA[This is the longtime blog and picture sharing site for my wife and I.   The original might have been the first website I ever built.  Here are some details about the current version of the site.

]]></description>
			<content:encoded><![CDATA[<p>This is the longtime blog and picture sharing site for my wife and I.   The original might have been the first website I ever built.  <a href="http://unseen.ws/2009/04/mosscatcom-redesign/">Here </a>are some details about the current version of the site.</p>
<p><a href="http://unseen.ws/wp-content/uploads/2010/05/mosscatlogo.png"><img class="aligncenter size-full wp-image-136" title="mosscatlogo" src="http://unseen.ws/wp-content/uploads/2010/05/mosscatlogo.png" alt="" width="180" height="58" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://unseen.ws/2010/05/mosscat-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Smoron.com</title>
		<link>http://unseen.ws/2010/05/smoron-com/</link>
		<comments>http://unseen.ws/2010/05/smoron-com/#comments</comments>
		<pubDate>Fri, 07 May 2010 05:31:00 +0000</pubDate>
		<dc:creator>hrrkii</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://unseen.ws/?p=129</guid>
		<description><![CDATA[My childhood best friend and his girlfriend had realized the seemingly simple smore actually had a vast array of different variations.  They dreamed up the concept of allowing people to share smore recipes with each other.  They pitched the idea to me and it sounded like a lot of fun so we dug in and [...]]]></description>
			<content:encoded><![CDATA[<p>My childhood best friend and his girlfriend had realized the seemingly simple smore actually had a vast array of different variations.  They dreamed up the concept of allowing people to share smore recipes with each other.  They pitched the idea to me and it sounded like a lot of fun so we dug in and out popped Smoron.  You can find a few more details in<a href="http://unseen.ws/2009/03/smoron-goes-live/"> the blog post</a> I put up when it launched.</p>
<p><a href="http://unseen.ws/wp-content/uploads/2010/05/smoron_logo.png"><img class="aligncenter size-full wp-image-131" title="smoron_logo" src="http://unseen.ws/wp-content/uploads/2010/05/smoron_logo.png" alt="" width="263" height="40" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://unseen.ws/2010/05/smoron-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FootballBee.com</title>
		<link>http://unseen.ws/2010/05/footballbee-com/</link>
		<comments>http://unseen.ws/2010/05/footballbee-com/#comments</comments>
		<pubDate>Fri, 07 May 2010 05:17:55 +0000</pubDate>
		<dc:creator>hrrkii</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://unseen.ws/?p=120</guid>
		<description><![CDATA[I put this project together as an entry for the Daily Developer Challenge.  You can read a little more about it in this blog entry.
Being a big football fan I had been search for an excuse to do something related to my favorite sport, and this was the perfect one.  The only disappointing thing was [...]]]></description>
			<content:encoded><![CDATA[<p>I put this project together as an entry for the Daily Developer Challenge.  You can read a little more about it in <a href="http://unseen.ws/2008/07/daylife-developer-challenge/">this blog entry</a>.</p>
<p>Being a big football fan I had been search for an excuse to do something related to my favorite sport, and this was the perfect one.  The only disappointing thing was finding out the truth about just how little my beloved Seattle Seahawks get attention from the media.</p>
<p><a href="http://unseen.ws/wp-content/uploads/2010/05/footballbee-com.png"></a><a href="http://unseen.ws/wp-content/uploads/2010/05/fbb.png"><img class="aligncenter size-medium wp-image-121" title="fbb" src="http://unseen.ws/wp-content/uploads/2010/05/fbb-300x94.png" alt="" width="300" height="94" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://unseen.ws/2010/05/footballbee-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Netbeans, PHPUnit, and You</title>
		<link>http://unseen.ws/2009/06/netbeans-phpunit-and-you/</link>
		<comments>http://unseen.ws/2009/06/netbeans-phpunit-and-you/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 19:27:22 +0000</pubDate>
		<dc:creator>hrrkii</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://unseen.ws/?p=84</guid>
		<description><![CDATA[My love affair with NetBeans continues.  The latest discovery in the long list of things to rave about is it&#8217;s newly built in (was part of the 6.7 Beta release) support for unit testing with PHPUnit.  There is a nice tutorial over on the NetBeans site that gets you up and running with it in [...]]]></description>
			<content:encoded><![CDATA[<p>My<a href="http://unseen.ws/2009/03/netbeans-for-php-ftw/"> love affair with NetBeans</a> continues.  The latest discovery in the long list of things to rave about is it&#8217;s newly built in (was part of the 6.7 Beta release) support for unit testing with PHPUnit.  There is a <a href="http://www.netbeans.org/kb/docs/php/phpunit.html" target="_blank">nice tutorial</a> over on the NetBeans site that gets you up and running with it in no time.</p>
<p>I got done with the tutorial and was stoked to try running unit tests on an existing project from within netbeans, but I quickly hit the wall when I tried running a test:</p>
<p><img class="alignnone size-full wp-image-88" title="System-2" src="http://unseen.ws/wp-content/uploads/2009/06/System-2.jpg" alt="System-2" width="478" height="368" /></p>
<p>Figured no prob, I&#8217;ll just open the project properties and set the test directory.  Hit another wall, that field is read only and won&#8217;t let you type in it.  After some more playing I finally stumbled across the solution for telling NetBeans about an existing tests directory.</p>
<p><span id="more-84"></span></p>
<p>You have to right click on the project and select Test:</p>
<p><img class="alignnone size-full wp-image-89" title="System" src="http://unseen.ws/wp-content/uploads/2009/06/System.jpg" alt="System" width="459" height="580" /></p>
<p>After doing that you&#8217;ll get the dialog asking where the tests dir is:</p>
<p><img class="alignnone size-medium wp-image-87" title="System-1" src="http://unseen.ws/wp-content/uploads/2009/06/System-1-300x135.jpg" alt="System-1" width="300" height="135" /></p>
<p>Once you set the test dir Netbeans will know where to find you&#8217;re tests and you&#8217;ll be good go:</p>
<p><img class="alignnone size-full wp-image-85" title="phpunit_testing - NetBeans IDE 6.7 RC2-1" src="http://unseen.ws/wp-content/uploads/2009/06/phpunit_testing-NetBeans-IDE-6.7-RC2-1.jpg" alt="phpunit_testing - NetBeans IDE 6.7 RC2-1" width="331" height="304" /></p>
<p>That&#8217;s all well and good, but what if you ever want to move the test directory?  You&#8217;re up a against the same problem where the test directory in the project properties box is a read only field.  Here are the steps I took to be able to get around this:</p>
<ol>
<li>close the project if  it is open</li>
<li>find your nbproject direcotry (in the project root by default)</li>
<li>pop open the project.properties file inside of the nbproject directory</li>
<li>look for the line with the test.src.dir variable</li>
<li>edit the value or remove the line and go through the steps above for telling NB where the test dir is</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://unseen.ws/2009/06/netbeans-phpunit-and-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speed Tests of Zend_Config Approaches</title>
		<link>http://unseen.ws/2009/05/speed-tests-of-zend_config-approaches/</link>
		<comments>http://unseen.ws/2009/05/speed-tests-of-zend_config-approaches/#comments</comments>
		<pubDate>Tue, 05 May 2009 17:24:15 +0000</pubDate>
		<dc:creator>hrrkii</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://unseen.ws/?p=71</guid>
		<description><![CDATA[On a project I&#8217;m working on we are using bits and pieces from the Zend Framework.  We want to utilize the Zend_Config functionality to be able to standardize and make it easier to setup as well as access config information.  We also wanted a way to be able to have the config automatically reflect the [...]]]></description>
			<content:encoded><![CDATA[<p>On a project I&#8217;m working on we are using bits and pieces from the<a href="http://framework.zend.com/" target="_blank"> Zend Framework</a>.  We want to utilize the <a href="http://framework.zend.com/manual/en/zend.config.html" target="_blank">Zend_Config</a> functionality to be able to standardize and make it easier to setup as well as access config information.  We also wanted a way to be able to have the config automatically reflect the environment we are running in (production vs testing vs dev).</p>
<p>Our first stab at it was utilizing ini format configs and the <a href="http://framework.zend.com/manual/en/zend.config.adapters.ini.html"> Zend_Config_Ini</a> importer.  The configs were nice and clean, and had support built in for being environment aware.  This also is the approach the documentation seems to be pushing, almost anything that utilizes a config example in the documentation utilizes ini style configs.</p>
<p>A couple thoughts kept creeping into my mind though.  Whats the performance of converting ini file into the final config object going to be like?  How does it compare to other possible approaches to loading the config object?</p>
<p>Only one way to find out.  Time to fire up the PHP Raceway (my little homegrown testing framework for testing out these sort of things).  What I did was take the example config from the <a href="http://framework.zend.com/docs/quickstart" target="_blank">quick start</a> documentation and added a config section for an array of data, then set up that config for trying out the three different approaches.  First is the standard ini way, second is building an array in php then building the config object from that, and third is creating a blank config object and loading it by hand.  Here are the racers.</p>
<p><span id="more-71"></span></p>
<h3>The Racers</h3>
<h4><strong>The INI approach</strong></h4>
<p><em>Instantiation Code:</em></p>
<div class="codecolorer-container php twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$config</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Config_Ini<span style="color: #009900;">&#40;</span>CONFIG_PATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/config.ini'</span><span style="color: #339933;">,</span> APPLICATION_ENVIRONMENT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p><em> Config File:</em></p>
<div class="codecolorer-container ini twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ini codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>production<span style="">&#93;</span></span><br />
phpSettings.display_startup_errors <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 0</span><br />
phpSettings.display_errors <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 0</span><br />
bootstrap.path <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> APPLICATION_PATH </span><span style="color: #933;">&quot;/Bootstrap.php&quot;</span><br />
bootstrap.class <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;Bootstrap&quot;</span><br />
resources.frontController.controllerDirectory <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> APPLICATION_PATH </span><span style="color: #933;">&quot;/controllers&quot;</span><br />
resources.layout.layoutPath <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> APPLICATION_PATH </span><span style="color: #933;">&quot;/layouts/scripts&quot;</span><br />
resources.view<span style="">&#91;</span><span style="">&#93;</span> <span style="color: #000066; font-weight:bold;">=</span><br />
resources.db.adapter <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;PDO_SQLITE&quot;</span><br />
resources.db.params.dbname <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> APPLICATION_PATH </span><span style="color: #933;">&quot;/../data/db/guestbook.db&quot;</span><br />
testarray<span style="">&#91;</span><span style="">&#93;</span> <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;test1&quot;</span><br />
testarray<span style="">&#91;</span><span style="">&#93;</span> <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;test2&quot;</span><br />
testarray<span style="">&#91;</span><span style="">&#93;</span> <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;test3&quot;</span><br />
testarray<span style="">&#91;</span><span style="">&#93;</span> <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;test4&quot;</span><br />
testarray<span style="">&#91;</span><span style="">&#93;</span> <span style="color: #000066; font-weight:bold;">=</span> <span style="color: #933;">&quot;test5&quot;</span><br />
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>staging : production<span style="">&#93;</span></span><br />
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>testing : production<span style="">&#93;</span></span><br />
phpSettings.display_startup_errors <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 1</span><br />
phpSettings.display_errors <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 1</span><br />
resources.db.params.dbname <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> APPLICATION_PATH </span><span style="color: #933;">&quot;/../data/db/guestbook-testing.db&quot;</span><br />
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>development : production<span style="">&#93;</span></span><br />
phpSettings.display_startup_errors <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 1</span><br />
phpSettings.display_errors <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 1</span><br />
resources.db.params.dbname <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> APPLICATION_PATH </span><span style="color: #933;">&quot;/../data/db/guestbook-dev.db&quot;</span></div></div>
<h4><strong>The PHP Array approach</strong></h4>
<p><em>Instantiation Code:</em></p>
<div class="codecolorer-container php twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$config</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Config<span style="color: #009900;">&#40;</span><span style="color: #b1b100;">require</span> CONFIG_PATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/config.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p><em> Config File:</em></p>
<div class="codecolorer-container php twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #000088;">$config</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">'phpSettings'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #339933;">=&gt;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'display_startup_errors'</span> &nbsp; &nbsp; <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'phpSettings.display_errors'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">'boostrap'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=&gt;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'path'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=&gt;</span> APPLICATION_PATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;/Bootstrap.php&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'class'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;Bootstrap&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">'resources'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #339933;">=&gt;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'frontController'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #339933;">=&gt;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'controllerDirectory'</span> &nbsp; &nbsp;<span style="color: #339933;">=&gt;</span> APPLICATION_PATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;/controllers&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'layout'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=&gt;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'layoutPath'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=&gt;</span> APPLICATION_PATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;/layouts/scripts&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'view'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=&gt;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'db'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=&gt;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'adapter'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;PDO_SQLITE&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'params'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=&gt;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'dbname'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=&gt;</span> APPLICATION_PATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;/../data/db/guestbook.db&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">'testarray'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #339933;">=&gt;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'test1'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'test2'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'test3'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'test4'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'test5'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>APPLICATION_ENVIRONMENT <span style="color: #339933;">==</span> <span style="color: #0000ff;">'staging'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span>APPLICATION_ENVIRONMENT <span style="color: #339933;">==</span> <span style="color: #0000ff;">'teseting'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'phpSettings'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'display_startup_errors'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'phpSettings'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'display_errors'</span><span style="color: #009900;">&#93;</span> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'resources'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'db'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'params'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dbname'</span><span style="color: #009900;">&#93;</span> &nbsp; <span style="color: #339933;">=</span> APPLICATION_PATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;/../data/db/guestbook-testing.db&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$config</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span>APPLICATION_ENVIRONMENT <span style="color: #339933;">==</span> <span style="color: #0000ff;">'development'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'phpSettings'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'display_startup_errors'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'phpSettings'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'display_errors'</span><span style="color: #009900;">&#93;</span> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'resources'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'db'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'params'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dbname'</span><span style="color: #009900;">&#93;</span> &nbsp; <span style="color: #339933;">=</span> APPLICATION_PATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;/../data/db/guestbook-testing.db&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$config</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #b1b100;">return</span> <span style="color: #000088;">$config</span><span style="color: #339933;">;</span></div></div>
<h4><strong>The PHP Config Fill approach</strong></h4>
<p><em>Instantiation Code:</em></p>
<div class="codecolorer-container php twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$config</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Config<span style="color: #009900;">&#40;</span><a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">require</span> CONFIG_PATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/config_fill.php'</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setReadOnly</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p><em> Config File:</em></p>
<div class="codecolorer-container php twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #000088;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">phpSettings</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">phpSettings</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">display_startup_errors</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">phpSettings</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">display_errors</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">boostrap</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">boostrap</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">path</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #339933;">=</span> APPLICATION_PATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;/Bootstrap.php&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">boostrap</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">class</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Bootstrap'</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">resources</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">resources</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">frontController</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">resources</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">frontController</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">controllerDirectory</span> <span style="color: #339933;">=</span> APPLICATION_PATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;/controllers&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">resources</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">layout</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">resources</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">layout</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">layoutPath</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=</span> APPLICATION_PATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;/layouts/scripts&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">resources</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">view</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">resources</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">db</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">resources</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">adapter</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;PDO_SQLITE&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">resources</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">params</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">resources</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">params</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">dbname</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=</span> APPLICATION_PATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;/../data/db/guestbook.db&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">testarray</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'test1'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'test2'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'test3'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'test4'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'test5'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>APPLICATION_ENVIRONMENT <span style="color: #339933;">==</span> <span style="color: #0000ff;">'staging'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span>APPLICATION_ENVIRONMENT <span style="color: #339933;">==</span> <span style="color: #0000ff;">'teseting'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">phpSettings</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">display_startup_errors</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">phpSettings</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">display_errors</span> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">resources</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">params</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">dbname</span> &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=</span> APPLICATION_PATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;/../data/db/guestbook-testing.db&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span>APPLICATION_ENVIRONMENT <span style="color: #339933;">==</span> <span style="color: #0000ff;">'development'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">phpSettings</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">display_startup_errors</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">phpSettings</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">display_errors</span> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">resources</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">params</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">dbname</span> &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=</span> APPLICATION_PATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;/../data/db/guestbook-testing.db&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<h3><strong>The results</strong></h3>
<p style="padding-left: 30px;">*times are in seconds*<br />
laps   = 10000</p>
<p>PHP Array Config Format is the WINNER!<br />
total time = 2.70539808273<br />
average time = 0.00027054</p>
<p>Ini Config Format results:<br />
total time = 4.37592101097 which is 1.67052292824 slower than the winner<br />
average time = 0.00043759 which is 0.00016705 per lap slower than the winner<br />
this racer took 62% longer than the winner</p>
<p>PHP Config Fill results:<br />
total time = 3.37267208099 which is 0.66727399826 slower than the winner<br />
average time = 0.00033727 which is 6.673E-5 per lap slower than the winner<br />
this racer took 25% longer than the winner</p>
<h3>Conclusion</h3>
<p>If speed is absolute biggest concern, I&#8217;d have to say go with the building of an array and passing it into the constructer.  The array aproach made our eyes burn, so we ended up going with the hand filling of the config object because the little bit of performance hit was worth the trade off of and easier to work with and read config file.</p>
<p>One huge thing of note.  I run <a href="http://xcache.lighttpd.net/" target="_blank">xcache</a> on my systems, and to be honest could not image running a production system without some sort of opcode cacher.  If you happen to not have access to an opcode cacher these results will change drastically.  Check out what happens when I turn xcache off:</p>
<p style="padding-left: 30px;">*times are in seconds*<br />
laps   = 10000</p>
<p>PHP Array Config Format is the WINNER!<br />
total time = 3.0291249752<br />
average time = 0.00030291</p>
<p>Ini Config Format results:<br />
total time = 4.26868700981 which is 1.23956203461 slower than the winner<br />
average time = 0.00042687 which is 0.00012396 per lap slower than the winner<br />
this racer took 41% longer than the winner</p>
<p>PHP Config Fill results:<br />
total time = 4.76278781891 which is 1.7336628437 slower than the winner<br />
average time = 0.00047628 which is 0.00017337 per lap slower than the winner<br />
this racer took 58% longer than the winner</p>
<p>If you you&#8217;re not running an opcode cacher looks like you had better steer clear of the hand filling approach and go with the array for speed or ini for maintainability.<br />
In the end this sort of micro-optimization may not gain you much in terms of noticeable real world performance, especially when you compare this to the cost of database or api queries.  But if you&#8217;re a speed freak, or are trying to cut down on the work your server is having to do during the day, this is some good food for thought.</p>
]]></content:encoded>
			<wfw:commentRss>http://unseen.ws/2009/05/speed-tests-of-zend_config-approaches/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP multibyte character dumbness</title>
		<link>http://unseen.ws/2009/04/php-multibyte-character-dumbness/</link>
		<comments>http://unseen.ws/2009/04/php-multibyte-character-dumbness/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 17:29:52 +0000</pubDate>
		<dc:creator>hrrkii</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[utf8]]></category>

		<guid isPermaLink="false">http://unseen.ws/?p=68</guid>
		<description><![CDATA[I got bit this week by something that I have somehow managed to avoid via complete dumb luck up till now.  It&#8217;s the fact that PHP is retarded when it comes to handling UTF-8 strings.
I couldn&#8217;t figure out why a string kept coming out with gibberish on the end.  The app was truncating the string [...]]]></description>
			<content:encoded><![CDATA[<p>I got bit this week by something that I have somehow managed to avoid via complete dumb luck up till now.  It&#8217;s the fact that PHP is retarded when it comes to handling UTF-8 strings.</p>
<p>I couldn&#8217;t figure out why a string kept coming out with gibberish on the end.  The app was truncating the string because it was too long, and the spot it was getting truncated at was at a single quote mark.  My initial thinking led me down a road where I thought perhaps it was one of those goofy quote marks and maybe it had gotten incorrectly encoded along the way and was not proper UTF-8.  After determining it was not an encoding problem one of the guys at work reminded me that UTF-8 characters can be mutibyte, and perhaps it had something to do with that.  After a little research, sure enough, the substr function I was using is one of dumb functions and was chopping that multibyte character in half, leaving only the gibberish.</p>
<p>In PHP &lt; version 6 the core string functionality generally disregards the fact that charters could be multibyte, and just assumes 1 byte = 1 character.  In my research I ran across a great page that has a rundown of the different problematic string functions and their level of risk when it comes to dealing with UTF-8:   <a href="http://www.phpwact.org/php/i18n/utf-8">Handling UTF-8 with PHP [Web Application Component Toolkit]</a>.</p>
<p>My particluar situation was resolved by not chopping in the middle of words and instead finding and chopping at the preceding whitespace, but if you don&#8217;t have the luxury of tweaking your logic, I highly recommend taking a look at the <a href="http://us.php.net/mbstring">Multibyte String Library</a>, or procrastinate until PHP6 is out :)</p>
]]></content:encoded>
			<wfw:commentRss>http://unseen.ws/2009/04/php-multibyte-character-dumbness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Dev Communities</title>
		<link>http://unseen.ws/2009/04/web-dev-communities/</link>
		<comments>http://unseen.ws/2009/04/web-dev-communities/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 22:46:50 +0000</pubDate>
		<dc:creator>hrrkii</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://unseen.ws/?p=65</guid>
		<description><![CDATA[Ran across this article from Marco Tabini and along with being pretty insightful it cracked me up, and I thought was worth sharing:
The Accidental Businessman: Communities.
Now I&#8217;ve not actually been part of the Ruby community, but I can tell you that when I cross paths with someone who is from it, I generally come away [...]]]></description>
			<content:encoded><![CDATA[<p>Ran across this article from Marco Tabini and along with being pretty insightful it cracked me up, and I thought was worth sharing:</p>
<p><a href="http://mtabini.blogspot.com/2009/04/communities.html">The Accidental Businessman: Communities</a>.</p>
<p>Now I&#8217;ve not actually been part of the Ruby community, but I can tell you that when I cross paths with someone who is from it, I generally come away feeling the same way that Marco does.</p>
<p>The contrast of the PHP and Python communities was pretty good.  Having <a href="http://unseen.ws/2009/03/smoron-goes-live/">recently dipped my toe</a> into the Python community I would have to agree with the keg party vs study group metaphor.  Though I did tend to find the python folks overly harsh and often misinformed when it came to criticism of PHPers.  Maybe our party music is disturbing their studies :)</p>
]]></content:encoded>
			<wfw:commentRss>http://unseen.ws/2009/04/web-dev-communities/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MossCat.com Redesign</title>
		<link>http://unseen.ws/2009/04/mosscatcom-redesign/</link>
		<comments>http://unseen.ws/2009/04/mosscatcom-redesign/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 22:46:28 +0000</pubDate>
		<dc:creator>hrrkii</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[dev]]></category>
		<category><![CDATA[mosscat]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[website]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://unseen.ws/?p=59</guid>
		<description><![CDATA[
Just launched a redesign of my wife and I&#8217;s personal blog and photo site.  You can read about some of the motivation on the MossCat Reborn post over on mosscat.com.
The work involved was a new page design and creation of a Wordpress theme from that design.  I made use of the Tan Tan Flickr Photo [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mosscat.com"><img class="aligncenter size-full wp-image-60" title="mosscat logo" src="http://unseen.ws/wp-content/uploads/2009/04/logo.png" alt="mosscat logo" width="180" height="58" /></a></p>
<p>Just launched a redesign of my wife and I&#8217;s personal blog and photo site.  You can read about some of the motivation on the <a href="http://mosscat.com/2009/04/mosscat-reborn/">MossCat Reborn</a> post over on <a href="http://mosscat.com">mosscat.com</a>.</p>
<p>The work involved was a new page design and creation of a Wordpress theme from that design.  I made use of the <a href="http://tantannoodles.com/toolkit/photo-album/">Tan Tan Flickr Photo Album </a>plugin to incorporate our flickr photos.  I&#8217;m very pleased with how it turned out.</p>
<p>The only casualty along the way was IE6 due to the png alpha used in the background images. There is a nice <a href="http://24ways.org/2007/supersleight-transparent-png-in-ie6">article on 24Ways.org</a> discussing the issue.  I gave the SuperSleight solution a try, but it didn&#8217;t work very well, plus  I also feel that it is somewhat my duty to help the web move forward by doing my part to let IE6 die, so I&#8217;m content with the page looking like garbage on IE6.</p>
<p>The design utilizes<a href="http://developer.yahoo.com/yui/grids/"> YUI Grids CSS</a> for the layout and <a href="http://developer.yahoo.com/yui/base/">YUI Base CSS </a>for the style foundation.  I investigated a number of other css frameworks that are currently out there such as <a href="http://www.blueprintcss.org/">BluePrint</a> and <a href="http://960.gs/">960 GS</a> since I&#8217;ve used YUI in the past and wanted to see what else there was.  There is a lot of great choices out there, and all have a little somthing to offer, but ultimately I came back to YUI CSS because I preferred its documentation, flexibility, and capabilities over the other options I found.</p>
]]></content:encoded>
			<wfw:commentRss>http://unseen.ws/2009/04/mosscatcom-redesign/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>hunch.com review</title>
		<link>http://unseen.ws/2009/04/hunchcom-review/</link>
		<comments>http://unseen.ws/2009/04/hunchcom-review/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 23:22:40 +0000</pubDate>
		<dc:creator>hrrkii</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://unseen.ws/?p=55</guid>
		<description><![CDATA[Alex gave me an invite to try out hunch.com and I gave it a whirl since it sounded like a good concept, but I tried 3 questions and am thoroughly not impressed.
Maybe I&#8217;m too particular, maybe it&#8217;s the questions I asked, but spending just as much time with google  as I did with this service [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://notjustrandom.com/blog/2009/03/30/trying-out-hunch/">Alex</a> gave me an invite to try out <a href="http://hunch.com">hunch.com</a> and I gave it a whirl since it sounded like a good concept, but I tried 3 questions and am thoroughly not impressed.</p>
<p>Maybe I&#8217;m too particular, maybe it&#8217;s the questions I asked, but spending just as much time with google  as I did with this service or using the &#8220;I&#8217;m feeling lucky&#8221; button would have yielded me better results.</p>
<p>I asked about what would be the best cloud computing platform and it did not take into account my particular situation and so half the answers were of no use to me (a flaw Alex also noticed).</p>
<p>I asked about which longboard I should buy (now that the weather is getting nice I&#8217;m hunting for one), and it new nothing of my question and would not allow me to start a new topic since I had not used the service enough.  I guess it is good for spam blocking, but annoying.</p>
<p>I also threw hunch a softball question after it crashed and burned on the first two and asked about which mac would be right for me.  It did manage to pick the type of mac I&#8217;m currently eyeballing but did not offer any help as far as which configuration or the type of customization I would need to make it useful for me.  It helped point me in the general direction but failed to yield what I consider a truly useful result.</p>
<p>Hopefully it can get better with time as it &#8220;learns&#8221; from the crowd, but for now it is just a novelty.</p>
]]></content:encoded>
			<wfw:commentRss>http://unseen.ws/2009/04/hunchcom-review/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
