What does the null coalescing operator (??) do?
- A Returns the right operand when the left is null or undefined
- B Converts null to zero
- C Throws an error on null
- D Checks whether a variable is set only
Answer
Returns the right operand when the left is null or undefined
$a ?? 'default' replaces the older isset() ternary. The ??= form assigns only when the left side is null.





