06-12-2008, 01:38 AM
|
#5 (permalink)
|
|
is cute and cuddly
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
|
It may not be, you'd be surprised... I find it extremely handy to have on hand, but then again I'm all about shorthand. A lot of my code will do things like;
PHP Code:
if ($bool === true) return true; return false;
...instead of...
PHP Code:
if ($bool === true) { return true; } else { return false; }
...which would also be a situation where the ternary could be used...
PHP Code:
return ($bool === true) ? true : false;
-m
|
|
|
|