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

How does the match expression differ from a switch statement?

  1. A match returns a value, uses strict comparison and has no fall-through
  2. B match uses loose comparison
  3. C switch returns a value
  4. D They are identical
Answer

match returns a value, uses strict comparison and has no fall-through

match also throws UnhandledMatchError when no arm matches, rather than silently doing nothing as switch does without a default.

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