<?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: An &#8220;Accident&#8221; I Constantly See in PHP Scripts</title>
	<atom:link href="http://scriptnode.com/article/an-accident-i-constantly-see-in-php-scripts/feed/" rel="self" type="application/rss+xml" />
	<link>http://scriptnode.com/article/an-accident-i-constantly-see-in-php-scripts/</link>
	<description>Tips and tricks for web developers.</description>
	<lastBuildDate>Sun, 18 Jul 2010 10:29:51 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Matt Hackett</title>
		<link>http://scriptnode.com/article/an-accident-i-constantly-see-in-php-scripts/comment-page-1/#comment-112</link>
		<dc:creator>Matt Hackett</dc:creator>
		<pubDate>Mon, 04 Aug 2008 06:47:43 +0000</pubDate>
		<guid isPermaLink="false">http://scriptnode.com/?p=45#comment-112</guid>
		<description>I agree on using double quotes when apostrophes are present, but things being a language&#039;s &quot;fault&quot; are exactly the sort of situations that engineers need to be prepared for. Take JavaScript for example: it&#039;s one of the messiest languages around, but is quite elegant when used properly. PHP has similar traits.</description>
		<content:encoded><![CDATA[<p>I agree on using double quotes when apostrophes are present, but things being a language&#8217;s &#8220;fault&#8221; are exactly the sort of situations that engineers need to be prepared for. Take JavaScript for example: it&#8217;s one of the messiest languages around, but is quite elegant when used properly. PHP has similar traits.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert</title>
		<link>http://scriptnode.com/article/an-accident-i-constantly-see-in-php-scripts/comment-page-1/#comment-95</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Wed, 30 Jul 2008 14:49:46 +0000</pubDate>
		<guid isPermaLink="false">http://scriptnode.com/?p=45#comment-95</guid>
		<description>It seems logical to me that the double quote should be the bigger encloser and should always be used.

First, several languages don&#039;t like &#039;multiple characters&#039; and requires &quot;multiple characters&quot;
So by being using double quotes in languages that are flexible, you can remain being consistent.

Second, the probability of having a single quote in a string is much more likely then having a double quote.
Thus this is easier and cleaner &quot;book&#039;s&quot; than doing &#039;book\&#039;s&#039;

Third, the double quote just seems like it should be bigger and thus enclose single quotes rather than the other way around.

As far as PHP&#039;s parser needing more time to parse double quoted strings over single quoted ones? Well, that&#039;s PHP&#039;s fault and not something that any SANE engineer should ever concern themselves with :)</description>
		<content:encoded><![CDATA[<p>It seems logical to me that the double quote should be the bigger encloser and should always be used.</p>
<p>First, several languages don&#8217;t like &#8216;multiple characters&#8217; and requires &#8220;multiple characters&#8221;<br />
So by being using double quotes in languages that are flexible, you can remain being consistent.</p>
<p>Second, the probability of having a single quote in a string is much more likely then having a double quote.<br />
Thus this is easier and cleaner &#8220;book&#8217;s&#8221; than doing &#8216;book\&#8217;s&#8217;</p>
<p>Third, the double quote just seems like it should be bigger and thus enclose single quotes rather than the other way around.</p>
<p>As far as PHP&#8217;s parser needing more time to parse double quoted strings over single quoted ones? Well, that&#8217;s PHP&#8217;s fault and not something that any SANE engineer should ever concern themselves with :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Urquhart</title>
		<link>http://scriptnode.com/article/an-accident-i-constantly-see-in-php-scripts/comment-page-1/#comment-91</link>
		<dc:creator>James Urquhart</dc:creator>
		<pubDate>Tue, 29 Jul 2008 15:29:28 +0000</pubDate>
		<guid isPermaLink="false">http://scriptnode.com/?p=45#comment-91</guid>
		<description>Personally i tend to go for the one-true-brace style, as it makes it easier for me to determine where all the &quot;scopes&quot; are when there is a lot of nesting going on.

Still, i also make sure indent my code so one could say that point is doesn&#039;t make much sense.

Thankfully though, i&#039;ve actually been doing a lot of programming in Ruby recently. No brackets there to worry about. There&#039;s still the single vs double quotes issue though. I always go for single quotes unless i need extra parsing.

For other projects, i try to stick as close as possible to the original formatting as i can.</description>
		<content:encoded><![CDATA[<p>Personally i tend to go for the one-true-brace style, as it makes it easier for me to determine where all the &#8220;scopes&#8221; are when there is a lot of nesting going on.</p>
<p>Still, i also make sure indent my code so one could say that point is doesn&#8217;t make much sense.</p>
<p>Thankfully though, i&#8217;ve actually been doing a lot of programming in Ruby recently. No brackets there to worry about. There&#8217;s still the single vs double quotes issue though. I always go for single quotes unless i need extra parsing.</p>
<p>For other projects, i try to stick as close as possible to the original formatting as i can.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
