<?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: SmartLoader Reloaded</title>
	<atom:link href="http://www.sitepoint.com/blogs/2006/04/07/smartloader-reloaded/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sitepoint.com/blogs/2006/04/07/smartloader-reloaded/</link>
	<description>News, opinion, and fresh thinking for web developers and designers. The official podcast of sitepoint.com.</description>
	<lastBuildDate>Mon, 23 Nov 2009 12:09:39 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Christiaan</title>
		<link>http://www.sitepoint.com/blogs/2006/04/07/smartloader-reloaded/comment-page-1/#comment-564856</link>
		<dc:creator>Christiaan</dc:creator>
		<pubDate>Fri, 21 Dec 2007 15:21:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1505#comment-564856</guid>
		<description>Download link still ain&#039;t available, I also would like to try out this new version. Especially since you&#039;ve mentioned the DIRECTORY_SEPERATOR, which probably was why it wasn&#039;t working for me before on Windows.</description>
		<content:encoded><![CDATA[<p>Download link still ain&#8217;t available, I also would like to try out this new version. Especially since you&#8217;ve mentioned the DIRECTORY_SEPERATOR, which probably was why it wasn&#8217;t working for me before on Windows.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Jann</title>
		<link>http://www.sitepoint.com/blogs/2006/04/07/smartloader-reloaded/comment-page-1/#comment-401963</link>
		<dc:creator>Jann</dc:creator>
		<pubDate>Mon, 01 Oct 2007 09:27:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1505#comment-401963</guid>
		<description>Hmm, the download link ist not available anymore, can i get the smartloader update elsewhere?</description>
		<content:encoded><![CDATA[<p>Hmm, the download link ist not available anymore, can i get the smartloader update elsewhere?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: michel</title>
		<link>http://www.sitepoint.com/blogs/2006/04/07/smartloader-reloaded/comment-page-1/#comment-61165</link>
		<dc:creator>michel</dc:creator>
		<pubDate>Thu, 28 Sep 2006 15:04:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1505#comment-61165</guid>
		<description>Probably extremely late to the party...

Mincer:
&gt; I found a little ‘quirk’ in the regex pattern,
&gt; in that it matches commented code.

My concern as well, though it&#039;s easily fixed with a little token_get_all(), T_CLASS and T_INTERFACE.</description>
		<content:encoded><![CDATA[<p>Probably extremely late to the party&#8230;</p>
<p>Mincer:<br />
&gt; I found a little ‘quirk’ in the regex pattern,<br />
&gt; in that it matches commented code.</p>
<p>My concern as well, though it&#8217;s easily fixed with a little token_get_all(), T_CLASS and T_INTERFACE.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Mincer</title>
		<link>http://www.sitepoint.com/blogs/2006/04/07/smartloader-reloaded/comment-page-1/#comment-25796</link>
		<dc:creator>Mincer</dc:creator>
		<pubDate>Wed, 24 May 2006 15:45:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1505#comment-25796</guid>
		<description>Oops, let&#039;s try that again....

(why no preview for comments???)

Maarten,

I found a little ‘quirk’ in the regex pattern, in that it matches commented code.

Not only would this be an issue if it thought it could find a class that had been commented out, but also you could inadvertantly overwrite the location of a real class in the index file while writing examples in another file that was scanned elsewhere in the indexing process.

E.g.

File 1:

&lt;code class=&quot;php&quot;&gt;/**
* FooBar class
*
* Not bothered what I write here, as it’s a comment…
*
* Example Usage:
*
* class MyClass extends FooBar {}
*
*/
&lt;/code&gt;

File 2:

&lt;code class=&quot;php&quot;&gt;class MyClass
{
$foo = bar;
}&lt;/code&gt;

The index thinks the class can be found in File 1, rather than File 2.

Matt.</description>
		<content:encoded><![CDATA[<p>Oops, let&#8217;s try that again&#8230;.</p>
<p>(why no preview for comments???)</p>
<p>Maarten,</p>
<p>I found a little ‘quirk’ in the regex pattern, in that it matches commented code.</p>
<p>Not only would this be an issue if it thought it could find a class that had been commented out, but also you could inadvertantly overwrite the location of a real class in the index file while writing examples in another file that was scanned elsewhere in the indexing process.</p>
<p>E.g.</p>
<p>File 1:</p>
<code class="php">/**
* FooBar class
*
* Not bothered what I write here, as it’s a comment…
*
* Example Usage:
*
* class MyClass extends FooBar {}
*
*/
</code>
<p>File 2:</p>
<code class="php">class MyClass
{
$foo = bar;
}</code>
<p>The index thinks the class can be found in File 1, rather than File 2.</p>
<p>Matt.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Mincer</title>
		<link>http://www.sitepoint.com/blogs/2006/04/07/smartloader-reloaded/comment-page-1/#comment-25795</link>
		<dc:creator>Mincer</dc:creator>
		<pubDate>Wed, 24 May 2006 15:43:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1505#comment-25795</guid>
		<description>Maarten,

I found a little &#039;quirk&#039; in the regex pattern, in that it matches commented code.

Not only would this be an issue if it thought it could find a class that had been commented out, but also you could inadvertantly overwrite the location of a real class in the index file while writing examples in another file that was scanned elsewhere in the indexing process.

E.g.

File 1:

[code]/**
 * FooBar class
 *
 * Not bothered what I write here, as it&#039;s a comment...
 *
 * Example Usage:
 * 
 * class MyClass extends FooBar {}
 *
 */
[/code]

File 2:

[code]class MyClass
{
    $foo = bar;
}[/code]

The index thinks the class can be found in File 1, rather than File 2.

Matt.</description>
		<content:encoded><![CDATA[<p>Maarten,</p>
<p>I found a little &#8216;quirk&#8217; in the regex pattern, in that it matches commented code.</p>
<p>Not only would this be an issue if it thought it could find a class that had been commented out, but also you could inadvertantly overwrite the location of a real class in the index file while writing examples in another file that was scanned elsewhere in the indexing process.</p>
<p>E.g.</p>
<p>File 1:</p>
<p>[code]/**<br />
 * FooBar class<br />
 *<br />
 * Not bothered what I write here, as it's a comment...<br />
 *<br />
 * Example Usage:<br />
 *<br />
 * class MyClass extends FooBar {}<br />
 *<br />
 */<br />
[/code]</p>
<p>File 2:</p>
<p>[code]class MyClass<br />
{<br />
    $foo = bar;<br />
}[/code]</p>
<p>The index thinks the class can be found in File 1, rather than File 2.</p>
<p>Matt.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: kyberfabrikken</title>
		<link>http://www.sitepoint.com/blogs/2006/04/07/smartloader-reloaded/comment-page-1/#comment-18469</link>
		<dc:creator>kyberfabrikken</dc:creator>
		<pubDate>Wed, 19 Apr 2006 21:50:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1505#comment-18469</guid>
		<description>An optimizer might be able fix the loop, but vanilla PHP doesn&#039;t have an optimizer. I always write for-loops as this to be sure :
&lt;code class=&quot;php&quot;&gt;
for ($i=0, $l=count($a); $i &lt; $l; ++$i) {
}
&lt;/code&gt;
Using ++$i rather than $i++ also saves an internal buffer.</description>
		<content:encoded><![CDATA[<p>An optimizer might be able fix the loop, but vanilla PHP doesn&#8217;t have an optimizer. I always write for-loops as this to be sure :<br />
<code class="php">
for ($i=0, $l=count($a); $i &lt; $l; ++$i) {
}
</code><br />
Using ++$i rather than $i++ also saves an internal buffer.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Maarten Manders</title>
		<link>http://www.sitepoint.com/blogs/2006/04/07/smartloader-reloaded/comment-page-1/#comment-17705</link>
		<dc:creator>Maarten Manders</dc:creator>
		<pubDate>Thu, 13 Apr 2006 06:27:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1505#comment-17705</guid>
		<description>mrsmiley, you can easily check that with the following code (or just XDebug/Cachegrind):

&lt;pre&gt;&lt;code class=&quot;php&quot;&gt;
for($i = 0; test() &amp;&amp; $i &lt; 5; $i++) { /* ... */ }

function test() {
	echo &#039;Test!&lt;br /&gt;&#039;;
	return true;
}
&lt;/code&gt;
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>mrsmiley, you can easily check that with the following code (or just XDebug/Cachegrind):</p>
<pre><code class="php">
for($i = 0; test() &amp;&amp; $i &lt; 5; $i++) { /* ... */ }

function test() {
	echo 'Test!<br />';
	return true;
}
</code>
</pre>]]></content:encoded>
	</item>
	<item>
		<title>By: mrsmiley</title>
		<link>http://www.sitepoint.com/blogs/2006/04/07/smartloader-reloaded/comment-page-1/#comment-17682</link>
		<dc:creator>mrsmiley</dc:creator>
		<pubDate>Thu, 13 Apr 2006 00:40:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1505#comment-17682</guid>
		<description>&lt;blockquote&gt;The sizeof function would be executed for every iteration, which makes a loop about 10x slower than a foreach.&lt;/blockquote&gt;

I hope this isn&#039;t the case.  I used to think that until I ran some tests a while back and it&#039;s only executed on the first iteration.  My test was something like

$test = array(.....);
for ($i=0; $i&quot;prior&quot; to adding more elements inside it.

I believe you only experience said effect while using something like while() and each().</description>
		<content:encoded><![CDATA[<blockquote><p>The sizeof function would be executed for every iteration, which makes a loop about 10x slower than a foreach.</p></blockquote>
<p>I hope this isn&#8217;t the case.  I used to think that until I ran some tests a while back and it&#8217;s only executed on the first iteration.  My test was something like</p>
<p>$test = array(&#8230;..);<br />
for ($i=0; $i&#8221;prior&#8221; to adding more elements inside it.</p>
<p>I believe you only experience said effect while using something like while() and each().</p>]]></content:encoded>
	</item>
	<item>
		<title>By: mwolfe</title>
		<link>http://www.sitepoint.com/blogs/2006/04/07/smartloader-reloaded/comment-page-1/#comment-17595</link>
		<dc:creator>mwolfe</dc:creator>
		<pubDate>Wed, 12 Apr 2006 00:44:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1505#comment-17595</guid>
		<description>sorry
&lt;code&gt;
$total = sizeof($array);
for($i=0; $i&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>sorry<br />
<code>
$total = sizeof($array);
for($i=0; $i</code></p>]]></content:encoded>
	</item>
	<item>
		<title>By: mwolfe</title>
		<link>http://www.sitepoint.com/blogs/2006/04/07/smartloader-reloaded/comment-page-1/#comment-17594</link>
		<dc:creator>mwolfe</dc:creator>
		<pubDate>Wed, 12 Apr 2006 00:42:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1505#comment-17594</guid>
		<description>and then there is the obvious performance booster:
$total = sizeof($array);
for($i=0; $i</description>
		<content:encoded><![CDATA[<p>and then there is the obvious performance booster:<br />
$total = sizeof($array);<br />
for($i=0; $i</p>]]></content:encoded>
	</item>
</channel>
</rss>
