PHP Ternary Operator ? :
$val = 10;$total = 0;$total = $val > 9 ? ($val + 10) : 0;
echo $total; // $val equals 20
Here is another example:
$newValue = $val ?: 9;
In this example $newValue is 10. Notice when $val is NOT null the $newVal will be the value of $val otherwise it's the value behind ?: which is 9 in this case.