Use of require in PHP Library
Use of require in PHP Library
ayz
Posts: 63Questions: 23Answers: 1
Within the code of PHP library, I see usage of require as opposed to require_once. Just curious as to why there was no performance concern in doing this from your end.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
I was confident enough that in the libraries each script was only included once, so we didn't need the (albeit minor) overhead of
require_once
(since it needs to look up what was loaded before).If you feel happier with it, you could certainly switch it to use
require_once
.Allan