Simple question: Is the scope of require_once
global?
For example:
To more specifically answer your question, the second time you call require_once
on that file, it won't do anything, because it's already be included.
If your include has functions etc. in it, then you would have issues including it inside a function anyway, so scope is irrelevant. If it's just variables being defined or processed, then you can just use require
instead of require_once
if you want it to be included again, thereby redefining the variables in your scope.