PHP Include VS Require

July, 2018

The require() function performs the same as include() except for error handling.

include() will generate a warning and continue to execute while require() will generate a fatal error and stop.

The require() and require_once() functions are the same. The require_once() function will check to see if it has already been included, require() won’t check.