Quiz on PHP Conditional Operators Examples



1. What is the syntax for the ternary conditional operator in PHP?
2. Which of the following is a valid example of using the ternary operator in PHP?
3. What does the null coalescing operator (??) do in PHP?
4. Which of the following statements is true about the short-circuit evaluation in PHP?
5. What is the purpose of the spaceship operator (<=>) in PHP?

Advertisements