Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

What does the null coalescing operator (??) do?

  1. A Returns the right operand when the left is null or undefined
  2. B Converts null to zero
  3. C Throws an error on null
  4. 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.

All Php MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as