In PHP most of the oeprators are binary operators which combine two operands or expressions
into a single but more complex expression. PHP has some unary and one ternary operators as well.
Unary operators convert a single expression into a more complex expression and a ternary operator
combines three expressions into a single expression.
A ternary operator is faster and cleaner way through which we can write simple if/else statements.
$variable = condition ? if true : if false
Portion to the left of the ? is a condition of testing.
Portion between the ? and the : is the result/output if the condition is true.
Portion after the : is the result/output if the condition is false.
$cow = "white";
$x = ($cow = "white") ? "Wow! This cow is of my favourite colour."
: "Uhh! This cow's colour is not favourite one.";