php ternary if else assign nothing code example Example: php ternary shorthand $y = $x ? "true" : "false";