<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[PunBB Forums — Code repetition]]></title>
		<link>https://punbb.informer.com/forums/topic/18577/code-repetition/</link>
		<atom:link href="https://punbb.informer.com/forums/feed/rss/topic/18577/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Code repetition.]]></description>
		<lastBuildDate>Mon, 03 Mar 2008 23:00:21 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Code repetition]]></title>
			<link>https://punbb.informer.com/forums/post/110929/#p110929</link>
			<description><![CDATA[<p>OP was exaggerating. There&#039;s plenty of foreach in the code, when it makes sense to use it.</p>]]></description>
			<author><![CDATA[null@example.com (Adam Atlas)]]></author>
			<pubDate>Mon, 03 Mar 2008 23:00:21 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/110929/#p110929</guid>
		</item>
		<item>
			<title><![CDATA[Re: Code repetition]]></title>
			<link>https://punbb.informer.com/forums/post/110927/#p110927</link>
			<description><![CDATA[<p>Out of curiosity, why you don&#039;t use foreach?</p>]]></description>
			<author><![CDATA[null@example.com (Strofanto)]]></author>
			<pubDate>Mon, 03 Mar 2008 22:48:21 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/110927/#p110927</guid>
		</item>
		<item>
			<title><![CDATA[Re: Code repetition]]></title>
			<link>https://punbb.informer.com/forums/post/110816/#p110816</link>
			<description><![CDATA[<p>FYI, I&#039;m not sure whether you meant it to or not, but your post comes off sounding very rude.</p><p>I personally don&#039;t see any particular advantage to doing things that way in the specific instance you&#039;re mentioning (especially since your example actually takes more lines then what is required otherwise). What are the advantages?</p>]]></description>
			<author><![CDATA[null@example.com (Smartys)]]></author>
			<pubDate>Sun, 02 Mar 2008 23:02:53 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/110816/#p110816</guid>
		</item>
		<item>
			<title><![CDATA[Code repetition]]></title>
			<link>https://punbb.informer.com/forums/post/110812/#p110812</link>
			<description><![CDATA[<p>There are many instances of code repetition found in PunBB. Are you guys not aware of it or what? Like in changeset 1540 (<a href="http://dev.punbb.org/changeset/1540">http://dev.punbb.org/changeset/1540</a>), you can do:</p><div class="codebox"><pre><code>$basename = $pun_config[&#039;o_avatars_dir&#039;].&#039;/&#039;.$id;
foreach(array(&#039;gif&#039;, &#039;jpg&#039;, &#039;png&#039;) as $ext) {
 $file = &quot;basename.$ext&quot;;
 if(file_exists($file)) {
  @unlink($file);
 }
}</code></pre></div><p>Oh wait, I forgot you guys don&#039;t use foreach()</p>]]></description>
			<author><![CDATA[null@example.com (orlandu63)]]></author>
			<pubDate>Sun, 02 Mar 2008 22:53:49 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/110812/#p110812</guid>
		</item>
	</channel>
</rss>
