help me read this line of shorthand

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

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

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
  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests