Multiple choice

_________ will cause a fatal error and termination of the script.

  1. require()

  2. require_once()

  3. both (1) and (2)

  4. include

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Both require() and require_once() cause fatal errors and terminate the script if the included file cannot be found or cannot be opened. This is different from include() and include_once(), which only generate warnings and allow the script to continue. The '_once' variants ensure the file is included only once even if called multiple times.