<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: require(),  require_once() and Dynamic Autoloading in PHP</title>
	<atom:link href="http://gen5.info/q/2009/01/09/an-awesome-autoloader-for-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://gen5.info/q/2009/01/09/an-awesome-autoloader-for-php/</link>
	<description>Towards Intelligent Systems</description>
	<lastBuildDate>Tue, 23 Jun 2009 19:10:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Paul Houle</title>
		<link>http://gen5.info/q/2009/01/09/an-awesome-autoloader-for-php/comment-page-1/#comment-4221</link>
		<dc:creator>Paul Houle</dc:creator>
		<pubDate>Tue, 10 Feb 2009 16:12:42 +0000</pubDate>
		<guid isPermaLink="false">http://gen5.info/q/?p=137#comment-4221</guid>
		<description>Good catch @alecu,  I fixed it!</description>
		<content:encoded><![CDATA[<p>Good catch @alecu,  I fixed it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alecu</title>
		<link>http://gen5.info/q/2009/01/09/an-awesome-autoloader-for-php/comment-page-1/#comment-4219</link>
		<dc:creator>alecu</dc:creator>
		<pubDate>Tue, 10 Feb 2009 15:27:18 +0000</pubDate>
		<guid isPermaLink="false">http://gen5.info/q/?p=137#comment-4219</guid>
		<description>02 for (int i=0;i&lt;10;$i++) {
03    require &quot;template-$i.php&quot;;
04 }
to cause the sequential execution of a  namset of PHP files named “template-0.php” through “template-10.php.” 

You mean template-0 through template-9 :)</description>
		<content:encoded><![CDATA[<p>02 for (int i=0;i&lt;10;$i++) {<br />
03    require &#8220;template-$i.php&#8221;;<br />
04 }<br />
to cause the sequential execution of a  namset of PHP files named “template-0.php” through “template-10.php.” </p>
<p>You mean template-0 through template-9 <img src='http://gen5.info/q/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Houle</title>
		<link>http://gen5.info/q/2009/01/09/an-awesome-autoloader-for-php/comment-page-1/#comment-3107</link>
		<dc:creator>Paul Houle</dc:creator>
		<pubDate>Thu, 22 Jan 2009 20:16:56 +0000</pubDate>
		<guid isPermaLink="false">http://gen5.info/q/?p=137#comment-3107</guid>
		<description>@Brown,

    you&#039;re right about the caching.  My experience is that serialize() and unserialize() are pretty quick,  but print_r() could also be used to generate a PHP include file thats initialize the data structure as well.

    If you&#039;re loading a small number of classes from a very large set,  there will eventually be a crossover point where you&#039;re better off keeping the mapping in a persistent key/value store than loading the whole thing.

    It would be a fun bunch of experiments,  but the performance is good enough for me right now.</description>
		<content:encoded><![CDATA[<p>@Brown,</p>
<p>    you&#8217;re right about the caching.  My experience is that serialize() and unserialize() are pretty quick,  but print_r() could also be used to generate a PHP include file thats initialize the data structure as well.</p>
<p>    If you&#8217;re loading a small number of classes from a very large set,  there will eventually be a crossover point where you&#8217;re better off keeping the mapping in a persistent key/value store than loading the whole thing.</p>
<p>    It would be a fun bunch of experiments,  but the performance is good enough for me right now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A.J. Brown</title>
		<link>http://gen5.info/q/2009/01/09/an-awesome-autoloader-for-php/comment-page-1/#comment-3099</link>
		<dc:creator>A.J. Brown</dc:creator>
		<pubDate>Thu, 22 Jan 2009 18:59:00 +0000</pubDate>
		<guid isPermaLink="false">http://gen5.info/q/?p=137#comment-3099</guid>
		<description>This is a great article, Thanks!

One thing I&#039;d like to reiterate is caching your class-to-file map if you&#039;re going to use an autoloader such as the one I proposed.  I&#039;ve found that in some of my largest applications, It can take as much as 4 seconds to scan all of the files and build the map.  That&#039;s obviously not desirable.  However, once the map is built and cached, it runs very quickly.

Depending on your system, you might want to try caching with Memcached or sqlite vs serialization.  I&#039;d like to experiment with a sqlite adaptation and compare that with the cost of serialization.</description>
		<content:encoded><![CDATA[<p>This is a great article, Thanks!</p>
<p>One thing I&#8217;d like to reiterate is caching your class-to-file map if you&#8217;re going to use an autoloader such as the one I proposed.  I&#8217;ve found that in some of my largest applications, It can take as much as 4 seconds to scan all of the files and build the map.  That&#8217;s obviously not desirable.  However, once the map is built and cached, it runs very quickly.</p>
<p>Depending on your system, you might want to try caching with Memcached or sqlite vs serialization.  I&#8217;d like to experiment with a sqlite adaptation and compare that with the cost of serialization.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ivan</title>
		<link>http://gen5.info/q/2009/01/09/an-awesome-autoloader-for-php/comment-page-1/#comment-2482</link>
		<dc:creator>Ivan</dc:creator>
		<pubDate>Mon, 12 Jan 2009 18:26:53 +0000</pubDate>
		<guid isPermaLink="false">http://gen5.info/q/?p=137#comment-2482</guid>
		<description>It might be too late for the php community, but it seems like Zend needs to move to some sort of module system.  Autoloading just leaves the door open for crappy implementations and poorly thought out dependency schemes.</description>
		<content:encoded><![CDATA[<p>It might be too late for the php community, but it seems like Zend needs to move to some sort of module system.  Autoloading just leaves the door open for crappy implementations and poorly thought out dependency schemes.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
