<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB"><title>Comments on Ternary Conditionals - ILoveJackDaniels.com</title><link rel="alternate" type="text/html" href="http://www.ilovejackdaniels.com/article/ternary-conditionals/" /><link rel="self" type="application/xml" href="http://www.ilovejackdaniels.com/article/ternary-conditionals/comments/atom/" /><subtitle>Latest comments on Ternary Conditionals on ILoveJackDaniels.com</subtitle><author><name>Dave Child</name></author><updated>2004-06-02T11:19:43Z</updated><id>tag:ilovejackdaniels.com,2004:77</id><entry><title>Comment on Ternary Conditionals</title><link rel="alternate" type="text/html" href="http://www.ilovejackdaniels.com/article/ternary-conditionals/comments/" /><summary type="text">Comment by Richie ( &lt;a href="http://www.lostyetidesign.com"&gt;http://www.lostyetidesign.com&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;Me and Ternary can now be best friends!</summary><id>tag:ilovejackdaniels.com,2008:92417</id><published>2008-04-17T21:32:09+01:00</published><updated>2008-04-17T21:32:09Z</updated></entry><entry><title>Comment on Ternary Conditionals</title><link rel="alternate" type="text/html" href="http://www.ilovejackdaniels.com/article/ternary-conditionals/comments/" /><summary type="text">Comment by Jason ( &lt;a href="http://www.sidewaysgravity.com"&gt;http://www.sidewaysgravity.com&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;Thanks for the explanation. I have used this a lot and love it, but I forgot the syntax and couldnt remember what it was called. It does save time and I use it on the alternating rows of a table all the time.</summary><id>tag:ilovejackdaniels.com,2008:76539</id><published>2008-02-13T19:24:53+00:00</published><updated>2008-02-13T19:24:53Z</updated></entry><entry><title>Comment on Ternary Conditionals</title><link rel="alternate" type="text/html" href="http://www.ilovejackdaniels.com/article/ternary-conditionals/comments/" /><summary type="text">Comment by Meat_PoPsiclez ( &lt;a href="http://"&gt;http://&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;In response to &quot;Paul, United Kingdom&quot;, you can actually run half baked php applications utilizing zend optimizer.  With large scripts where not all of the code is run, compilation time can sometimes exceed actual processing time, and zend can make substantial gains.&lt;br /&gt;&lt;br /&gt;However, it really doesn't apply here, because the actual code is, from what I can gather, generated in exactly the same way, and doesn't run any faster.</summary><id>tag:ilovejackdaniels.com,2007:45665</id><published>2007-07-23T15:56:24+01:00</published><updated>2007-07-23T15:56:24Z</updated></entry><entry><title>Comment on Ternary Conditionals</title><link rel="alternate" type="text/html" href="http://www.ilovejackdaniels.com/article/ternary-conditionals/comments/" /><summary type="text">Comment by Paul ( &lt;a href="http://"&gt;http://&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;AKX, does bitwise AND (&amp;) return true if both bit values added give an even result, and false if an odd result? I can see how it would be quicker.&lt;br /&gt;&lt;br /&gt;&quot;If speed is so important than compile the final product when everything is completed.&quot;&lt;br /&gt;&lt;br /&gt;With PHP being an interpretive language that would be challenging!</summary><id>tag:ilovejackdaniels.com,2007:43233</id><published>2007-07-13T12:09:23+01:00</published><updated>2007-07-13T12:09:23Z</updated></entry><entry><title>Comment on Ternary Conditionals</title><link rel="alternate" type="text/html" href="http://www.ilovejackdaniels.com/article/ternary-conditionals/comments/" /><summary type="text">Comment by Sloth ( &lt;a href="http://www.paxacidus.com"&gt;http://www.paxacidus.com&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;There is no reason to use ternary notation. If anything it is harder not easier to read and cannot be extended to include more options other than true or false. Succinct code may be great for the hard-core programmer but for the developer who must modify crap it is a nightmare. If speed is so important than compile the final product when everything is completed.</summary><id>tag:ilovejackdaniels.com,2007:41949</id><published>2007-07-09T11:11:17+01:00</published><updated>2007-07-09T11:11:17Z</updated></entry><entry><title>Comment on Ternary Conditionals</title><link rel="alternate" type="text/html" href="http://www.ilovejackdaniels.com/article/ternary-conditionals/comments/" /><summary type="text">Comment by AKX ( &lt;a href="http://"&gt;http://&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;Not to mention you can squeeze a bit more speed out of that zebra striping code with this:&lt;br /&gt;&lt;br /&gt;echo '&lt;tr class=&quot;'.($i&amp;1?'this':'that').'&quot;&gt;';&lt;br /&gt;&lt;br /&gt;Modulo is slower than bitwise AND, and in this case, it's the very same thing. :)</summary><id>tag:ilovejackdaniels.com,2007:32234</id><published>2007-05-11T15:46:36+01:00</published><updated>2007-05-11T15:46:36Z</updated></entry><entry><title>Comment on Ternary Conditionals</title><link rel="alternate" type="text/html" href="http://www.ilovejackdaniels.com/article/ternary-conditionals/comments/" /><summary type="text">Comment by John Zeratsky ( &lt;a href="http://johnzeratsky.com"&gt;http://johnzeratsky.com&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;TD: Yes, that would be better. My personal preference would be to &quot;stripe&quot; the rows via JavaScript, since 'even' and 'odd' classes have little to no semantic purpose and  shouldn't be in your HTML.</summary><id>tag:ilovejackdaniels.com,2007:22439</id><published>2007-01-30T15:57:01+00:00</published><updated>2007-01-30T15:57:01Z</updated></entry><entry><title>Comment on Ternary Conditionals</title><link rel="alternate" type="text/html" href="http://www.ilovejackdaniels.com/article/ternary-conditionals/comments/" /><summary type="text">Comment by TD ( &lt;a href="http://"&gt;http://&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;In your row example, would it not be better to use CSS and put it in the &lt;tr&gt; tag not every &lt;td&gt; tag?&lt;br /&gt;&lt;br /&gt;echo '  &lt;tr class=($i % 2) == 0) ? 'something' : 'else' &gt;';&lt;br /&gt;  echo '    &lt;td&gt;;&lt;br /&gt;    ...&lt;br /&gt;&lt;br /&gt;Or would this not work? Haven't actually tried it.. not got the time ;)</summary><id>tag:ilovejackdaniels.com,2006:19285</id><published>2006-12-17T20:56:55+00:00</published><updated>2006-12-17T20:56:55Z</updated></entry><entry><title>Comment on Ternary Conditionals</title><link rel="alternate" type="text/html" href="http://www.ilovejackdaniels.com/article/ternary-conditionals/comments/" /><summary type="text">Comment by Richard Duncan ( &lt;a href="http://punkte.co.uk http://www.buccanneersden.co.uk (Under construction)"&gt;http://punkte.co.uk http://www.buccanneersden.co.uk (Under construction)&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;This site continues to amaze me!</summary><id>tag:ilovejackdaniels.com,2006:17683</id><published>2006-12-07T12:26:39+00:00</published><updated>2006-12-07T12:26:39Z</updated></entry><entry><title>Comment on Ternary Conditionals</title><link rel="alternate" type="text/html" href="http://www.ilovejackdaniels.com/article/ternary-conditionals/comments/" /><summary type="text">Comment by Rob Lewis ( &lt;a href="http://wv4.co.uk"&gt;http://wv4.co.uk&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;Is it wrong to admit to just having used the ternary syntax for the first time in PHP?&lt;br /&gt;&lt;br /&gt;Anyway, thanks for the article.</summary><id>tag:ilovejackdaniels.com,2006:12809</id><published>2006-09-28T22:46:35+01:00</published><updated>2006-09-28T22:46:35Z</updated></entry></feed>