What is the difference between require and include?
- A require causes a fatal error and halts if the file is missing; include emits a warning and continues
- B include halts execution
- C They are identical
- 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.





