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 nullsafe operator (?->) do?

  1. A Returns null instead of throwing when calling a method on null
  2. B Suppresses all errors
  3. C Converts null to an empty string
  4. D Declares a nullable property
Answer

Returns null instead of throwing when calling a method on null

The chain short-circuits to null as soon as any link is null, avoiding an error on method call on 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