<?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"
	>
<channel>
	<title>Comments on: PHP Class Autoload</title>
	<atom:link href="http://www.warrenfalk.com/blog/2006/08/31/php-class-autoload/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.warrenfalk.com/blog/2006/08/31/php-class-autoload/</link>
	<description>readers are plentiful, thinkers are rare</description>
	<pubDate>Fri, 09 Jan 2009 20:52:29 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: melissa eimers</title>
		<link>http://www.warrenfalk.com/blog/2006/08/31/php-class-autoload/#comment-3909</link>
		<dc:creator>melissa eimers</dc:creator>
		<pubDate>Tue, 06 Mar 2007 02:33:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.warrenfalk.com/blog/2006/08/31/php-class-autoload/#comment-3909</guid>
		<description>check out my blog:  eimers.blogspot.com</description>
		<content:encoded><![CDATA[<p>check out my blog:  eimers.blogspot.com</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Warren Falk</title>
		<link>http://www.warrenfalk.com/blog/2006/08/31/php-class-autoload/#comment-3898</link>
		<dc:creator>Warren Falk</dc:creator>
		<pubDate>Mon, 05 Mar 2007 14:00:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.warrenfalk.com/blog/2006/08/31/php-class-autoload/#comment-3898</guid>
		<description>Including all your files in one central include file might have its benefits, such as allowing more flexibility in naming classes and where class files are stored, and compatibility with PHP4.  However, I would think that there could be a large drawback to this in terms of performance for large sites.  It could also have a potential impact on distributed development.

I get around the issue of having external classes by either using a stub include file for the external classes, or searching multiple folders for classes.  And I find that enforcing a naming convention (any naming convention that you can stick to) makes life easier in the long run.

Not all who read this will get the inside joke, which is that my sister, the author of the comment, to which I'm replying, is not a programmer and does not, to my knowledge, know any PHP.   I was not surprised to see she commented, because she has a reputation for clever humor in comments.  But I was quite surprised that her response made sense.  I'm flattered that she went to lengths to find an appropriate response even if she did plagiarize it.  Thanks, sis.
&lt;a rel="nofollow" href="http://www.weberblogs.com/article.php?story=20041129042029399"&gt;http://www.weberblogs.com/article.php?story=20041129042029399&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Including all your files in one central include file might have its benefits, such as allowing more flexibility in naming classes and where class files are stored, and compatibility with PHP4.  However, I would think that there could be a large drawback to this in terms of performance for large sites.  It could also have a potential impact on distributed development.</p>
<p>I get around the issue of having external classes by either using a stub include file for the external classes, or searching multiple folders for classes.  And I find that enforcing a naming convention (any naming convention that you can stick to) makes life easier in the long run.</p>
<p>Not all who read this will get the inside joke, which is that my sister, the author of the comment, to which I&#8217;m replying, is not a programmer and does not, to my knowledge, know any PHP.   I was not surprised to see she commented, because she has a reputation for clever humor in comments.  But I was quite surprised that her response made sense.  I&#8217;m flattered that she went to lengths to find an appropriate response even if she did plagiarize it.  Thanks, sis.<br />
<a rel="nofollow" href="http://www.weberblogs.com/article.php?story=20041129042029399">http://www.weberblogs.com/article.php?story=20041129042029399</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: melissa eimers</title>
		<link>http://www.warrenfalk.com/blog/2006/08/31/php-class-autoload/#comment-3870</link>
		<dc:creator>melissa eimers</dc:creator>
		<pubDate>Sun, 04 Mar 2007 19:31:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.warrenfalk.com/blog/2006/08/31/php-class-autoload/#comment-3870</guid>
		<description>I liked the idea, but had already solved that problem in PHP 4: I included a single file, called "include.php", which had all the include statements I needed throughout my site, whether this particular page needed them all or not. Anyway, I tried the __autoload function instead of the "all-include" file.


function __autoload($class_name) 
{
   include_once('classes/' . $class_name . '.php');
}

Straight away, I hit the problem of calling my php files with all the same name convention. I usually call my classes class.name.php. So In this case I would have to modify the function to include the class. in the front of it. But I don't only include classes in my scripts! I also use functions, and some classes that would not be found in this folder (like the Smarty class). So my decision is to stay away from the __autoload function. Just using an all-inclusive include.php file works much better for me.

Just thought I'd say that since no one else has had much to say.</description>
		<content:encoded><![CDATA[<p>I liked the idea, but had already solved that problem in PHP 4: I included a single file, called &#8220;include.php&#8221;, which had all the include statements I needed throughout my site, whether this particular page needed them all or not. Anyway, I tried the __autoload function instead of the &#8220;all-include&#8221; file.</p>
<p>function __autoload($class_name)<br />
{<br />
   include_once(&#8217;classes/&#8217; . $class_name . &#8216;.php&#8217;);<br />
}</p>
<p>Straight away, I hit the problem of calling my php files with all the same name convention. I usually call my classes class.name.php. So In this case I would have to modify the function to include the class. in the front of it. But I don&#8217;t only include classes in my scripts! I also use functions, and some classes that would not be found in this folder (like the Smarty class). So my decision is to stay away from the __autoload function. Just using an all-inclusive include.php file works much better for me.</p>
<p>Just thought I&#8217;d say that since no one else has had much to say.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
