<?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: PHP Associative Arrays Coding Style</title>
	<atom:link href="/2010/05/19/php-associative-arrays-coding-style/feed/" rel="self" type="application/rss+xml" />
	<link>/2010/05/19/php-associative-arrays-coding-style/</link>
	<description>on web development</description>
	<lastBuildDate>Fri, 26 Oct 2018 21:40:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>By: wyznaczanie szlaków</title>
		<link>/2010/05/19/php-associative-arrays-coding-style/comment-page-1/#comment-15989</link>
		<dc:creator><![CDATA[wyznaczanie szlaków]]></dc:creator>
		<pubDate>Wed, 13 Jun 2012 21:55:05 +0000</pubDate>
		<guid isPermaLink="false">/?p=1532#comment-15989</guid>
		<description><![CDATA[I feel like I&#039;m constantly searching for intriguing issues to read about a variety of subjects, but I manage to incorporate your weblog among my reads every day because you&#039;ve compelling entries that I appear forward to. Here&#039;s hoping there&#039;s a great deal far more remarkable material coming!]]></description>
		<content:encoded><![CDATA[<p>I feel like I&#8217;m constantly searching for intriguing issues to read about a variety of subjects, but I manage to incorporate your weblog among my reads every day because you&#8217;ve compelling entries that I appear forward to. Here&#8217;s hoping there&#8217;s a great deal far more remarkable material coming!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: EllisGL</title>
		<link>/2010/05/19/php-associative-arrays-coding-style/comment-page-1/#comment-13055</link>
		<dc:creator><![CDATA[EllisGL]]></dc:creator>
		<pubDate>Thu, 20 May 2010 13:26:51 +0000</pubDate>
		<guid isPermaLink="false">/?p=1532#comment-13055</guid>
		<description><![CDATA[@Stoimen: You are correct about that. Doh!]]></description>
		<content:encoded><![CDATA[<p>@Stoimen: You are correct about that. Doh!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stoimen</title>
		<link>/2010/05/19/php-associative-arrays-coding-style/comment-page-1/#comment-13054</link>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
		<pubDate>Thu, 20 May 2010 07:00:06 +0000</pubDate>
		<guid isPermaLink="false">/?p=1532#comment-13054</guid>
		<description><![CDATA[@Permana - Yes and that&#039;s well described by ZF&#039;s coding style &lt;a href=&quot;http://zendframework.com/manual/en/coding-standard.coding-style.html&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;:

&lt;blockquote&gt;&lt;em&gt;When using this latter declaration, we encourage using a trailing comma for the last item in the array; this minimizes the impact of adding new items on successive lines, and helps to ensure no parse errors occur due to a missing comma.&lt;/em&gt; &lt;/blockquote&gt;]]></description>
		<content:encoded><![CDATA[<p>@Permana &#8211; Yes and that&#8217;s well described by ZF&#8217;s coding style <a href="http://zendframework.com/manual/en/coding-standard.coding-style.html" rel="nofollow">here</a>:</p>
<blockquote><p><em>When using this latter declaration, we encourage using a trailing comma for the last item in the array; this minimizes the impact of adding new items on successive lines, and helps to ensure no parse errors occur due to a missing comma.</em> </p></blockquote>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stoimen</title>
		<link>/2010/05/19/php-associative-arrays-coding-style/comment-page-1/#comment-13053</link>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
		<pubDate>Thu, 20 May 2010 06:57:15 +0000</pubDate>
		<guid isPermaLink="false">/?p=1532#comment-13053</guid>
		<description><![CDATA[@EllisGL - note that in JavaScript you don&#039;t even use the =&#062; notation! So perhaps when you switch coding between PHP and JS there&#039;s not only the last comma problem but the different syntax.
However in JS it&#039;s difficult to say which syntax is correct because only MSIE doesn&#039;t accept the comma after the last pair. In other browsers the code&#039;s parsed correctly with the comma.]]></description>
		<content:encoded><![CDATA[<p>@EllisGL &#8211; note that in JavaScript you don&#8217;t even use the =&gt; notation! So perhaps when you switch coding between PHP and JS there&#8217;s not only the last comma problem but the different syntax.<br />
However in JS it&#8217;s difficult to say which syntax is correct because only MSIE doesn&#8217;t accept the comma after the last pair. In other browsers the code&#8217;s parsed correctly with the comma.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Permana Jayanta</title>
		<link>/2010/05/19/php-associative-arrays-coding-style/comment-page-1/#comment-13051</link>
		<dc:creator><![CDATA[Permana Jayanta]]></dc:creator>
		<pubDate>Thu, 20 May 2010 00:50:13 +0000</pubDate>
		<guid isPermaLink="false">/?p=1532#comment-13051</guid>
		<description><![CDATA[&quot;there’s a comma after the second pair. This is correct PHP syntax and is strongly encouraged&quot;

why it is encouraged ? is there any specific reason?]]></description>
		<content:encoded><![CDATA[<p>&#8220;there’s a comma after the second pair. This is correct PHP syntax and is strongly encouraged&#8221;</p>
<p>why it is encouraged ? is there any specific reason?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: EllisGL</title>
		<link>/2010/05/19/php-associative-arrays-coding-style/comment-page-1/#comment-13050</link>
		<dc:creator><![CDATA[EllisGL]]></dc:creator>
		<pubDate>Wed, 19 May 2010 15:29:20 +0000</pubDate>
		<guid isPermaLink="false">/?p=1532#comment-13050</guid>
		<description><![CDATA[I would argue about number 2 (ha ha). The problem come when you are working between PHP and JS. JS, you can&#039;t have the extra comma for your &quot;arrays&quot;

My formatting of arrays is like this
&lt;pre lang=&quot;php&quot; line=&quot;1&quot; escaped=&quot;true&quot;&gt;
$array = array(&#039;item1&#039; =&#062; &#039;thing&#039;,
               &#039;house&#039; =&#062; array(&#039;door&#039;   =&#062; &#039;red&#039;,
                                &#039;window&#039; =&#062; &#039;clear&#039;
                               )
              );
&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p>I would argue about number 2 (ha ha). The problem come when you are working between PHP and JS. JS, you can&#8217;t have the extra comma for your &#8220;arrays&#8221;</p>
<p>My formatting of arrays is like this</p>
<pre lang="php" line="1" escaped="true">
$array = array('item1' =&gt; 'thing',
               'house' =&gt; array('door'   =&gt; 'red',
                                'window' =&gt; 'clear'
                               )
              );
</pre>
]]></content:encoded>
	</item>
</channel>
</rss>
