<?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"
	>
<channel>
	<title>Comments on: Some PHP Abilities You May Not Know About</title>
	<atom:link href="http://www.davidjeffries.com/some-php-abilities-you-may-not-know-about/feed" rel="self" type="application/rss+xml" />
	<link>http://www.davidjeffries.com/some-php-abilities-you-may-not-know-about</link>
	<description>Internet, Programming, And Everything Else That Matters</description>
	<pubDate>Mon, 06 Oct 2008 12:49:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Development Tutorials</title>
		<link>http://www.davidjeffries.com/some-php-abilities-you-may-not-know-about#comment-575</link>
		<dc:creator>Development Tutorials</dc:creator>
		<pubDate>Sat, 19 Jul 2008 13:42:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidjeffries.com/?p=77#comment-575</guid>
		<description>I agree.  In that case I would probably use the ternary op. just to save time and space.  The problem is that &lt;strong&gt;A LOT&lt;/strong&gt; of people don't know how to use the ternary operator and don't understand what it means when they see it.

If you're working at a big company its easier to use the long way because every person understands that logic whereas most people won't understand the short way.  I know how to use the ternary operator and I can still figure out what I'm trying to do quicker if I do the long way.</description>
		<content:encoded><![CDATA[<p>I agree.  In that case I would probably use the ternary op. just to save time and space.  The problem is that <strong>A LOT</strong> of people don&#8217;t know how to use the ternary operator and don&#8217;t understand what it means when they see it.</p>
<p>If you&#8217;re working at a big company its easier to use the long way because every person understands that logic whereas most people won&#8217;t understand the short way.  I know how to use the ternary operator and I can still figure out what I&#8217;m trying to do quicker if I do the long way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Jeffries</title>
		<link>http://www.davidjeffries.com/some-php-abilities-you-may-not-know-about#comment-574</link>
		<dc:creator>David Jeffries</dc:creator>
		<pubDate>Sat, 19 Jul 2008 05:36:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidjeffries.com/?p=77#comment-574</guid>
		<description>Consider this example, when adding a class of selected to an element.

$class = $selected == true ? ' selected' : '';
echo '&#60;div class="'.$class.'"&#62;  &#60;/div&#62;';

versus:
if($selected){
$class = ' selected';
}else{
$class = '';
}
echo '&#60;div class="'.$class.'"&#62;  &#60;/div&#62;';

Many people will prefer the ternary operator and argue that it is cleaner than the long way (in some situations).</description>
		<content:encoded><![CDATA[<p>Consider this example, when adding a class of selected to an element.</p>
<p>$class = $selected == true ? &#8216; selected&#8217; : &#8221;;<br />
echo &#8216;&lt;div class=&#8221;&#8216;.$class.&#8217;&#8221;&gt;  &lt;/div&gt;&#8217;;</p>
<p>versus:<br />
if($selected){<br />
$class = &#8216; selected&#8217;;<br />
}else{<br />
$class = &#8221;;<br />
}<br />
echo &#8216;&lt;div class=&#8221;&#8216;.$class.&#8217;&#8221;&gt;  &lt;/div&gt;&#8217;;</p>
<p>Many people will prefer the ternary operator and argue that it is cleaner than the long way (in some situations).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Development Tutorials</title>
		<link>http://www.davidjeffries.com/some-php-abilities-you-may-not-know-about#comment-573</link>
		<dc:creator>Development Tutorials</dc:creator>
		<pubDate>Sat, 19 Jul 2008 05:31:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidjeffries.com/?p=77#comment-573</guid>
		<description>IMO the ternary operator shouldn't be used.  It makes the code harder to read and really doesn't help efficency.  I don't see a point in it.

if($var){
   //do something
} else {
  //do something else
}

That looks way cleaner.</description>
		<content:encoded><![CDATA[<p>IMO the ternary operator shouldn&#8217;t be used.  It makes the code harder to read and really doesn&#8217;t help efficency.  I don&#8217;t see a point in it.</p>
<p>if($var){<br />
   //do something<br />
} else {<br />
  //do something else<br />
}</p>
<p>That looks way cleaner.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PHP: Funktionen dynamisch aufrufen « lab111</title>
		<link>http://www.davidjeffries.com/some-php-abilities-you-may-not-know-about#comment-562</link>
		<dc:creator>PHP: Funktionen dynamisch aufrufen « lab111</dc:creator>
		<pubDate>Mon, 14 Jul 2008 16:08:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidjeffries.com/?p=77#comment-562</guid>
		<description>[...] David Jeffries » Some PHP Abilities You May Not Know About [...]</description>
		<content:encoded><![CDATA[<p>[...] David Jeffries » Some PHP Abilities You May Not Know About [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: php-web-developer</title>
		<link>http://www.davidjeffries.com/some-php-abilities-you-may-not-know-about#comment-481</link>
		<dc:creator>php-web-developer</dc:creator>
		<pubDate>Tue, 24 Jun 2008 10:03:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidjeffries.com/?p=77#comment-481</guid>
		<description>Pretty cool!!!!!!!!!!!!!!!</description>
		<content:encoded><![CDATA[<p>Pretty cool!!!!!!!!!!!!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://www.davidjeffries.com/some-php-abilities-you-may-not-know-about#comment-457</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Tue, 17 Jun 2008 02:42:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidjeffries.com/?p=77#comment-457</guid>
		<description>Twit... "This isn't about standards" was refering to the point about not using &#60;? instead of &#60;?php - not the arguement for or against standards. My referece to standards was not saying they were bad (far from) but to explain to DGM that I wasn't just telling him not to use it because it breaks standards; but that it will also break the deployablity of his code.</description>
		<content:encoded><![CDATA[<p>Twit&#8230; &#8220;This isn&#8217;t about standards&#8221; was refering to the point about not using &lt;? instead of &lt;?php - not the arguement for or against standards. My referece to standards was not saying they were bad (far from) but to explain to DGM that I wasn&#8217;t just telling him not to use it because it breaks standards; but that it will also break the deployablity of his code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mallyone</title>
		<link>http://www.davidjeffries.com/some-php-abilities-you-may-not-know-about#comment-446</link>
		<dc:creator>mallyone</dc:creator>
		<pubDate>Wed, 11 Jun 2008 23:27:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidjeffries.com/?p=77#comment-446</guid>
		<description>You caught me on a couple there! :)</description>
		<content:encoded><![CDATA[<p>You caught me on a couple there! <img src='http://www.davidjeffries.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adamz</title>
		<link>http://www.davidjeffries.com/some-php-abilities-you-may-not-know-about#comment-310</link>
		<dc:creator>Adamz</dc:creator>
		<pubDate>Wed, 21 May 2008 16:14:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidjeffries.com/?p=77#comment-310</guid>
		<description>"I am definitely not a standards Nazi and my blog details many arguments to the contrary; but this isn’t about standards its about maximising the “success” of your own code."

Nice comment..
I would never hire you.
It is about web standards guy.</description>
		<content:encoded><![CDATA[<p>&#8220;I am definitely not a standards Nazi and my blog details many arguments to the contrary; but this isn’t about standards its about maximising the “success” of your own code.&#8221;</p>
<p>Nice comment..<br />
I would never hire you.<br />
It is about web standards guy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Jeffries &#187; Some More PHP Abilities You May Not Know About</title>
		<link>http://www.davidjeffries.com/some-php-abilities-you-may-not-know-about#comment-298</link>
		<dc:creator>David Jeffries &#187; Some More PHP Abilities You May Not Know About</dc:creator>
		<pubDate>Tue, 20 May 2008 01:47:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidjeffries.com/?p=77#comment-298</guid>
		<description>[...] my first PHP abilities you may not know about post seemed to be useful, here is part 2: some more PHP abilities you may not know about. If you [...]</description>
		<content:encoded><![CDATA[<p>[...] my first PHP abilities you may not know about post seemed to be useful, here is part 2: some more PHP abilities you may not know about. If you [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: warren</title>
		<link>http://www.davidjeffries.com/some-php-abilities-you-may-not-know-about#comment-273</link>
		<dc:creator>warren</dc:creator>
		<pubDate>Tue, 13 May 2008 20:00:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidjeffries.com/?p=77#comment-273</guid>
		<description>Jonas: That also baffles me. I guess it takes into account data types etc as well.</description>
		<content:encoded><![CDATA[<p>Jonas: That also baffles me. I guess it takes into account data types etc as well.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
