What is difference between require_once(), require(), include()?

include()
————
It includes a specified file.
It will produce a a warning if it fail to find the file and execute the remaining scripts

require
———–
It includes a specified file.
It will produce a fatal error if it fail to find the file and stops the execution

include_once()
——————-
It includes a specified file.
a file has already been included, it will not be included again.
It will produce a warning if it fail to find the file and execute the remaining scripts.

require_once()
———–
It includes a specified file.
a file has already been included, it will not be included again.
It will produce a fatal error if it fail to find the file and stops the execution

Source: http://www.phpinterviewquestion.com/

Advertisements

About amitsonikhandwa
I am a web developer working in PHP and MYSQL with AJAX, jQuery and JavaScript. I am in web development since 2007.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s