It loads the entire script. The only difference between require
and require_once
is that if you call require_once
multiple times with the same script argument, the repetitions will be ignored.
A script loaded with require
or include
can have other things besides function definitions, and they need to be executed immediately when the file is loaded.