Anthony Gentile wrote:
True, it might mean the very slightest in milliseconds...depending on what you're doing/hardware.
Connecting to a db will (probably) take longer than most of those differences, let alone running a query & processing the results.
Ternaries that make a lot of people feel awesome because a lot is being accomplished in one line are also more opcodes than their if-else statement equivalents...and often times can be more confusing to future maintainers of the code.
I dislike ternaries for their over-use - I've seen nested ternaries and it's taken me 10 mins to read the code.. *shudder*.
-- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php