help me read this line of shorthand

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
seandisanti
php-forum Fan User
php-forum Fan User
Posts: 973
Joined: Mon Oct 01, 2012 12:32 pm

Re: help me read this line of shorthand

Post by seandisanti » Sat Mar 29, 2014 6:14 pm

that's whats called a ternary comparison. a boolean expression is evaluated and different responses are given depending on whether it's true or false.
in this case, the objects tax value which is stored in the settings is evaluated to make sure that it has a value greater than 0. if it doesn, that value is returned otherwise the value stored in $value is returned instead.

Post Reply

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 2 guests