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 is the difference between require and include?

  1. A require causes a fatal error and halts if the file is missing; include emits a warning and continues
  2. B include halts execution
  3. C They are identical
  4. D require only works with classes
Answer

require causes a fatal error and halts if the file is missing; include emits a warning and continues

Use require for anything the script cannot run without, so a missing file produces one clear error rather than a cascade of confusing ones.

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