|
Posted by JDS on 10/26/00 11:20
On Mon, 04 Jul 2005 04:47:10 -0700, binderup@gmail.com wrote:
> Why would people use the shortened version?
>
> I find it much harder to read, and I doubt that it will shave off many
> milliseconds
I will use it for things that work better (for me) on one line. For
example, I might use it to optionally stick an "s" on the end of a result
description
<? echo "There were $number item" . ( count($result) != 1 ? "s" : "" ) . "
found";?>
I actually use the ternary operator all the time. This is just one
example.
later...
--
JDS | jeffrey@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/
Navigation:
[Reply to this message]
|