<?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: The PHP ternary operator	</title>
	<atom:link href="https://keithdevon.com/the-php-ternary-operator/feed/" rel="self" type="application/rss+xml" />
	<link>https://keithdevon.com/the-php-ternary-operator/</link>
	<description>UK-based WordPress developer</description>
	<lastBuildDate>Thu, 06 Dec 2012 16:59:36 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.0.3</generator>
	<item>
		<title>
		By: Rob George		</title>
		<link>https://keithdevon.com/the-php-ternary-operator/#comment-163</link>

		<dc:creator><![CDATA[Rob George]]></dc:creator>
		<pubDate>Thu, 06 Dec 2012 16:59:36 +0000</pubDate>
		<guid isPermaLink="false">http://keithdevon.wpengine.com/?p=969#comment-163</guid>

					<description><![CDATA[I don&#039;t think the below works for your example but if you&#039;re just evaluating a value as true/false then since PHP 5.3, it is possible to leave out the middle part of the ternary operator. Expression expr1 ?: expr3 returns expr1 if expr1 evaluates to TRUE, and expr3 otherwise..

I think the longhand is more readable but it&#039;s good to know the different shorthand notations.]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t think the below works for your example but if you&#8217;re just evaluating a value as true/false then since PHP 5.3, it is possible to leave out the middle part of the ternary operator. Expression expr1 ?: expr3 returns expr1 if expr1 evaluates to TRUE, and expr3 otherwise..</p>
<p>I think the longhand is more readable but it&#8217;s good to know the different shorthand notations.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: keithdevon		</title>
		<link>https://keithdevon.com/the-php-ternary-operator/#comment-62</link>

		<dc:creator><![CDATA[keithdevon]]></dc:creator>
		<pubDate>Tue, 09 Oct 2012 11:45:54 +0000</pubDate>
		<guid isPermaLink="false">http://keithdevon.wpengine.com/?p=969#comment-62</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://keithdevon.com/the-php-ternary-operator/#comment-61&quot;&gt;Andy Roberts&lt;/a&gt;.

Good point Andy. I guess the main reason for posting this was to cement my understanding of the syntax, as a lot of developers use it. Whether I do or not remains to be seen!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://keithdevon.com/the-php-ternary-operator/#comment-61">Andy Roberts</a>.</p>
<p>Good point Andy. I guess the main reason for posting this was to cement my understanding of the syntax, as a lot of developers use it. Whether I do or not remains to be seen!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Andy Roberts		</title>
		<link>https://keithdevon.com/the-php-ternary-operator/#comment-61</link>

		<dc:creator><![CDATA[Andy Roberts]]></dc:creator>
		<pubDate>Tue, 09 Oct 2012 10:24:09 +0000</pubDate>
		<guid isPermaLink="false">http://keithdevon.wpengine.com/?p=969#comment-61</guid>

					<description><![CDATA[The longhand version is much better though isn&#039;t it. Why would you want to write code that doesn&#039;t make the logic explicit?]]></description>
			<content:encoded><![CDATA[<p>The longhand version is much better though isn&#8217;t it. Why would you want to write code that doesn&#8217;t make the logic explicit?</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
