<?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: Things You Probably Didn’t Know About PHP &#8211; Part 2</title>
	<atom:link href="http://www.devtheweb.net/blog/2010/01/19/things-you-probably-didnt-know-about-php-part-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.devtheweb.net/blog/2010/01/19/things-you-probably-didnt-know-about-php-part-2/</link>
	<description>for Those Who Develop Something on the Web</description>
	<lastBuildDate>Wed, 28 Jul 2010 03:56:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: foobar</title>
		<link>http://www.devtheweb.net/blog/2010/01/19/things-you-probably-didnt-know-about-php-part-2/comment-page-1/#comment-325</link>
		<dc:creator>foobar</dc:creator>
		<pubDate>Tue, 27 Jul 2010 15:32:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.devtheweb.net/blog/?p=640#comment-325</guid>
		<description>the title of the article should be: &quot;Things you probably didn&#039;t know about PHP if you just started programming.&quot;</description>
		<content:encoded><![CDATA[<p>the title of the article should be: &#8220;Things you probably didn&#8217;t know about PHP if you just started programming.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://www.devtheweb.net/blog/2010/01/19/things-you-probably-didnt-know-about-php-part-2/comment-page-1/#comment-241</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Sun, 24 Jan 2010 17:56:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.devtheweb.net/blog/?p=640#comment-241</guid>
		<description>@Utahcon: Omitting the closing ?&gt; PHP tag is certainly neither bad practice nor non-standard. It&#039;s required in the Zend Framework coding standards (http://framework.zend.com/manual/en/coding-standard.php-file-formatting.html) for instance. Doctrine and symfony (two other large projects) use the practice of omitting the closing tag as well just to name a few.

As for the rest of this article, you should be careful when you talk about things other people supposedly probably don&#039;t know. I found all of these trivial and indeed most of them can be found in the manual.</description>
		<content:encoded><![CDATA[<p>@Utahcon: Omitting the closing ?&gt; PHP tag is certainly neither bad practice nor non-standard. It&#8217;s required in the Zend Framework coding standards (<a href="http://framework.zend.com/manual/en/coding-standard.php-file-formatting.html" rel="nofollow">http://framework.zend.com/manual/en/coding-standard.php-file-formatting.html</a>) for instance. Doctrine and symfony (two other large projects) use the practice of omitting the closing tag as well just to name a few.</p>
<p>As for the rest of this article, you should be careful when you talk about things other people supposedly probably don&#8217;t know. I found all of these trivial and indeed most of them can be found in the manual.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SeanJA</title>
		<link>http://www.devtheweb.net/blog/2010/01/19/things-you-probably-didnt-know-about-php-part-2/comment-page-1/#comment-239</link>
		<dc:creator>SeanJA</dc:creator>
		<pubDate>Fri, 22 Jan 2010 21:55:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.devtheweb.net/blog/?p=640#comment-239</guid>
		<description>Glad I am not the only one that thinks that #2 is a horrible practice...</description>
		<content:encoded><![CDATA[<p>Glad I am not the only one that thinks that #2 is a horrible practice&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Utahcon</title>
		<link>http://www.devtheweb.net/blog/2010/01/19/things-you-probably-didnt-know-about-php-part-2/comment-page-1/#comment-238</link>
		<dc:creator>Utahcon</dc:creator>
		<pubDate>Fri, 22 Jan 2010 13:47:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.devtheweb.net/blog/?p=640#comment-238</guid>
		<description>#5 is a bad practice, and should be avoided. Since this is non-standard and inconstant usage of matching opening and closing tags, it should be avoided. It is always best to write code that is correct then to try to work around problems in case the work around becomes invalid in some future version. Correct code will always be correct. Code with a work around solution in it often breaks again.</description>
		<content:encoded><![CDATA[<p>#5 is a bad practice, and should be avoided. Since this is non-standard and inconstant usage of matching opening and closing tags, it should be avoided. It is always best to write code that is correct then to try to work around problems in case the work around becomes invalid in some future version. Correct code will always be correct. Code with a work around solution in it often breaks again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nandi</title>
		<link>http://www.devtheweb.net/blog/2010/01/19/things-you-probably-didnt-know-about-php-part-2/comment-page-1/#comment-237</link>
		<dc:creator>Nandi</dc:creator>
		<pubDate>Fri, 22 Jan 2010 12:44:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.devtheweb.net/blog/?p=640#comment-237</guid>
		<description>#6 can be a security risk, because it overwrites your local variables. Never use it to unpack $_REQUEST, $_GET, $_POST.
On the other hand it is quite useful in templates:
function showTemplate($file, $params) {
inlude &#039;tempaltepath/&#039; . $file;
}

in the template:
extract($params);</description>
		<content:encoded><![CDATA[<p>#6 can be a security risk, because it overwrites your local variables. Never use it to unpack $_REQUEST, $_GET, $_POST.<br />
On the other hand it is quite useful in templates:<br />
function showTemplate($file, $params) {<br />
inlude &#8216;tempaltepath/&#8217; . $file;<br />
}</p>
<p>in the template:<br />
extract($params);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim O'Halloran</title>
		<link>http://www.devtheweb.net/blog/2010/01/19/things-you-probably-didnt-know-about-php-part-2/comment-page-1/#comment-235</link>
		<dc:creator>Jim O'Halloran</dc:creator>
		<pubDate>Fri, 22 Jan 2010 00:54:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.devtheweb.net/blog/?p=640#comment-235</guid>
		<description>A neater way to return multiple values is to use an array, either an associative array as one of commenter&#039;s above sggested, or a simple array as follows...

function foo() {
  return array(&#039;bar&#039;, &#039;baz&#039;);
}
list($var1, $var2) = foo();
echo ($var1); // bar;
echo($var2); // baz

Pass by reference parameters is something that a lot of languages support, but can be difficult to work with unless you know what&#039;s happening.  Given PHP&#039;s great array support I;ve never had need to do it.

Jim.</description>
		<content:encoded><![CDATA[<p>A neater way to return multiple values is to use an array, either an associative array as one of commenter&#8217;s above sggested, or a simple array as follows&#8230;</p>
<p>function foo() {<br />
  return array(&#8216;bar&#8217;, &#8216;baz&#8217;);<br />
}<br />
list($var1, $var2) = foo();<br />
echo ($var1); // bar;<br />
echo($var2); // baz</p>
<p>Pass by reference parameters is something that a lot of languages support, but can be difficult to work with unless you know what&#8217;s happening.  Given PHP&#8217;s great array support I;ve never had need to do it.</p>
<p>Jim.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ftsoc</title>
		<link>http://www.devtheweb.net/blog/2010/01/19/things-you-probably-didnt-know-about-php-part-2/comment-page-1/#comment-233</link>
		<dc:creator>ftsoc</dc:creator>
		<pubDate>Thu, 21 Jan 2010 20:17:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.devtheweb.net/blog/?p=640#comment-233</guid>
		<description>actually at #2, you aren&#039;t returning values but passing values by reference, which means you change the passed variables when u do any op. on it. its  a huge difference.</description>
		<content:encoded><![CDATA[<p>actually at #2, you aren&#8217;t returning values but passing values by reference, which means you change the passed variables when u do any op. on it. its  a huge difference.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
