Skip to content

Instantly share code, notes, and snippets.

@azibom
Created May 12, 2020 14:30
Show Gist options
  • Save azibom/222d089fd17f7b0ffdaa134ac7fa0396 to your computer and use it in GitHub Desktop.
Save azibom/222d089fd17f7b0ffdaa134ac7fa0396 to your computer and use it in GitHub Desktop.
php note

require vs. include

The require() function is identical to include(), except that it handles errors differently. If an error occurs, the include() function generates a warning, but the script will continue execution. The require() generates a fatal error, and the script will stop.

require_once vs. require

The require_once() statement is identical to require() except PHP will check if the file has already been included, and if so, not include (require) it again.

link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment