What is the exact Diff. between include_once() and
require_once() in PHP?
Answer Posted / vineet kumar saini
1.include() includes a file in memory no matter if it has
already been loaded
2.include_once() includes a file in memory only if it has
not been loaded already
3.require() includes a file in memory no matter if it has
already been loaded. if the file cannot be loaded, the
script is aborted
4.require_once() does the same as require(), but only if the
file hasn't been included yet. if the file's already in
memory, it has no effect.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are headers in php?
Which framework is best for php?
Do you know what is use of count() function in php?
Why constructor is not overridden?
Which is better get or post method?
Explain me is multiple inheritance supported in php?
Which are the best start and end tags to use?
What is the correct php command to use to catch any error messages within the code?
How we can retrieve the data in the result set of mysql using php?
Do you know what is the differences between $a != $B and $a !== $B?
What is T_PAAMAYIM_NEKUDOTAYIM?
Why is php used for web development?
What is the delimiter default in PHP?
Why do we use csrf token?
Does php 7 support multiple inheritance?