Home »
MCQs »
PHP MCQs
What is the difference of include and require statements in PHP?
143. What is the difference of include and require statements in PHP?
- There is not difference both are the same
- require is an alias of include
- require returns the Fatal Error, while include returns the Warning
- include includes one PHP file while require can include multiple PHP files
Answer: C) require returns the Fatal Error, while include returns the Warning
Explanation:
The both include and require statements are used to insert the content of one file into another file. Since both are identical but require returns the Fatal Error, while include returns the Warning.