Comparison style
| From: | Jon Parise | Date: | Tue, 15 May 2001 02:31:45 +0000 |
| Subject: | Comparison style | ||
| Groups: | php.dev php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-380@lists.php.net to get a copy of this message | ||
I was just perusing some of the PEAR code, and a certain
condition caught my eye:
if ("" == $content)
My habit has always been to write that sort of condition using
the style:
if ($content == "")
(leaving the unknown value on the left side of the comparison
operator)
Is one of these styles preferable to the other, either always or
in certain instances?
--
Jon Parise (jon@csh.rit.edu) . Rochester Inst. of Technology
http://www.csh.rit.edu/~jon/ : Computer Science House
Member