If you want a condition where $b is a boolean, then the following means, if $b is true then pow(2,3) otherwise 0.

$b ? pow(2,3) : 0
Did this answer your question?