<?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: Lazy Loading in PHP with __autoload</title>
	<atom:link href="http://blog.dougalmatthews.com/2008/04/php-__autoload/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dougalmatthews.com/2008/04/php-__autoload/</link>
	<description></description>
	<pubDate>Fri, 05 Sep 2008 16:30:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Dougal</title>
		<link>http://blog.dougalmatthews.com/2008/04/php-__autoload/#comment-215</link>
		<dc:creator>Dougal</dc:creator>
		<pubDate>Mon, 25 Aug 2008 20:24:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dougalmatthews.com/?p=7#comment-215</guid>
		<description>It's more a case of if it’s not needed why use it? I've got many projects that use __autoload, I've only used spl_autoload_register a few times. I haven’t come across the need for more than one very often.

I personally think it’s better to try and stick to one. As the magic methods functionality is invisible once implemented, if you use too much it can lead to very hard to debug problems.
Unless you are combining a number of projects together with different structures in the class files then I don’t think you need spl_autoload. I actually can’t think of a good example for needing it besides what I just mentioned.

Damn, I need to make this textarea bigger... *goes away for a minute* ... that’s better!</description>
		<content:encoded><![CDATA[<p>It&#8217;s more a case of if it’s not needed why use it? I&#8217;ve got many projects that use __autoload, I&#8217;ve only used spl_autoload_register a few times. I haven’t come across the need for more than one very often.</p>
<p>I personally think it’s better to try and stick to one. As the magic methods functionality is invisible once implemented, if you use too much it can lead to very hard to debug problems.<br />
Unless you are combining a number of projects together with different structures in the class files then I don’t think you need spl_autoload. I actually can’t think of a good example for needing it besides what I just mentioned.</p>
<p>Damn, I need to make this textarea bigger&#8230; *goes away for a minute* &#8230; that’s better!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ovidiu Curcan</title>
		<link>http://blog.dougalmatthews.com/2008/04/php-__autoload/#comment-214</link>
		<dc:creator>Ovidiu Curcan</dc:creator>
		<pubDate>Mon, 25 Aug 2008 19:48:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dougalmatthews.com/?p=7#comment-214</guid>
		<description>@Dougal: Ok, I'll play along. You say it depends on the situation. Could you describe a situation where __autoload() is better than spl_autoload_register()? I agree that it makes sense covering this first (people should be informed after all), but there should be a warning at the top: “do not use, there's something better”. :)</description>
		<content:encoded><![CDATA[<p>@Dougal: Ok, I&#8217;ll play along. You say it depends on the situation. Could you describe a situation where __autoload() is better than spl_autoload_register()? I agree that it makes sense covering this first (people should be informed after all), but there should be a warning at the top: “do not use, there&#8217;s something better”. <img src='http://blog.dougalmatthews.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dougal</title>
		<link>http://blog.dougalmatthews.com/2008/04/php-__autoload/#comment-210</link>
		<dc:creator>Dougal</dc:creator>
		<pubDate>Mon, 25 Aug 2008 14:04:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dougalmatthews.com/?p=7#comment-210</guid>
		<description>Ovidiu Curcan, thats like saying Arrays are better because they can hold more than one value. It depends on the situation. It made sense to cover this first, I was going to cover spl_autoload but I havn't had the time yet.</description>
		<content:encoded><![CDATA[<p>Ovidiu Curcan, thats like saying Arrays are better because they can hold more than one value. It depends on the situation. It made sense to cover this first, I was going to cover spl_autoload but I havn&#8217;t had the time yet.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lee</title>
		<link>http://blog.dougalmatthews.com/2008/04/php-__autoload/#comment-209</link>
		<dc:creator>Lee</dc:creator>
		<pubDate>Mon, 25 Aug 2008 13:11:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dougalmatthews.com/?p=7#comment-209</guid>
		<description>__autoload can only be used once.

A better solution is http://php.net/spl_autoload_register as it allows you to register as many autoload functions/methods as necessary.</description>
		<content:encoded><![CDATA[<p>__autoload can only be used once.</p>
<p>A better solution is <a href="http://php.net/spl_autoload_register" rel="nofollow">http://php.net/spl_autoload_register</a> as it allows you to register as many autoload functions/methods as necessary.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ovidiu Curcan</title>
		<link>http://blog.dougalmatthews.com/2008/04/php-__autoload/#comment-208</link>
		<dc:creator>Ovidiu Curcan</dc:creator>
		<pubDate>Mon, 25 Aug 2008 12:33:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dougalmatthews.com/?p=7#comment-208</guid>
		<description>spl_autoload_register() should be preferred. It allows multiple handlers to be registered.</description>
		<content:encoded><![CDATA[<p>spl_autoload_register() should be preferred. It allows multiple handlers to be registered.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dougal</title>
		<link>http://blog.dougalmatthews.com/2008/04/php-__autoload/#comment-197</link>
		<dc:creator>Dougal</dc:creator>
		<pubDate>Sat, 23 Aug 2008 02:03:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dougalmatthews.com/?p=7#comment-197</guid>
		<description>No, __autoload must be declared in the global namespace. This is because it needs to be accessible from everywhere.

This makes it different from the other 'magic methods' as its not defined in a class or specific to a particular object instance.

As far as I know, in PHP 5.3 you can have one __autoload function per namespace. I'm not sure about this yet...</description>
		<content:encoded><![CDATA[<p>No, __autoload must be declared in the global namespace. This is because it needs to be accessible from everywhere.</p>
<p>This makes it different from the other &#8216;magic methods&#8217; as its not defined in a class or specific to a particular object instance.</p>
<p>As far as I know, in PHP 5.3 you can have one __autoload function per namespace. I&#8217;m not sure about this yet&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CHia</title>
		<link>http://blog.dougalmatthews.com/2008/04/php-__autoload/#comment-196</link>
		<dc:creator>CHia</dc:creator>
		<pubDate>Sat, 23 Aug 2008 01:20:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dougalmatthews.com/?p=7#comment-196</guid>
		<description>Can the __autoload declare in the class function ?</description>
		<content:encoded><![CDATA[<p>Can the __autoload declare in the class function ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dougal</title>
		<link>http://blog.dougalmatthews.com/2008/04/php-__autoload/#comment-17</link>
		<dc:creator>Dougal</dc:creator>
		<pubDate>Tue, 20 May 2008 22:18:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dougalmatthews.com/?p=7#comment-17</guid>
		<description>Yeah, I completely agree.

There are some work arounds to use class_exists with it, you can see them in the comments in the PHP docs. They are very messy however - but sometimes PHP tends to be like that.</description>
		<content:encoded><![CDATA[<p>Yeah, I completely agree.</p>
<p>There are some work arounds to use class_exists with it, you can see them in the comments in the PHP docs. They are very messy however - but sometimes PHP tends to be like that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jrgns</title>
		<link>http://blog.dougalmatthews.com/2008/04/php-__autoload/#comment-16</link>
		<dc:creator>Jrgns</dc:creator>
		<pubDate>Tue, 20 May 2008 22:14:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dougalmatthews.com/?p=7#comment-16</guid>
		<description>It's a pity, tough. I rely heavily on autoloading of classes, many times with actually knowing if it can/may happen. Exceptions would have made it much more robust!</description>
		<content:encoded><![CDATA[<p>It&#8217;s a pity, tough. I rely heavily on autoloading of classes, many times with actually knowing if it can/may happen. Exceptions would have made it much more robust!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dougal</title>
		<link>http://blog.dougalmatthews.com/2008/04/php-__autoload/#comment-15</link>
		<dc:creator>Dougal</dc:creator>
		<pubDate>Fri, 09 May 2008 12:10:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dougalmatthews.com/?p=7#comment-15</guid>
		<description>Your completely right. I'm sure I had a test case of this working but I must have been tripping out.

Updating it now to reflect that, thanks.</description>
		<content:encoded><![CDATA[<p>Your completely right. I&#8217;m sure I had a test case of this working but I must have been tripping out.</p>
<p>Updating it now to reflect that, thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jrgns</title>
		<link>http://blog.dougalmatthews.com/2008/04/php-__autoload/#comment-14</link>
		<dc:creator>Jrgns</dc:creator>
		<pubDate>Fri, 09 May 2008 11:30:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dougalmatthews.com/?p=7#comment-14</guid>
		<description>Do you have the code in production somewhere? As far as I know Exceptions doesn't work inside of __autoload...</description>
		<content:encoded><![CDATA[<p>Do you have the code in production somewhere? As far as I know Exceptions doesn&#8217;t work inside of __autoload&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dougal</title>
		<link>http://blog.dougalmatthews.com/2008/04/php-__autoload/#comment-8</link>
		<dc:creator>Dougal</dc:creator>
		<pubDate>Tue, 29 Apr 2008 17:52:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dougalmatthews.com/?p=7#comment-8</guid>
		<description>No problem, glad to see my new blog is helping some people.</description>
		<content:encoded><![CDATA[<p>No problem, glad to see my new blog is helping some people.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas</title>
		<link>http://blog.dougalmatthews.com/2008/04/php-__autoload/#comment-7</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Tue, 29 Apr 2008 17:49:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dougalmatthews.com/?p=7#comment-7</guid>
		<description>Thanks, this really helped. Didn't know there was anything like autoload &#60;3</description>
		<content:encoded><![CDATA[<p>Thanks, this really helped. Didn&#8217;t know there was anything like autoload &lt;3</p>
]]></content:encoded>
	</item>
</channel>
</rss>
