I wanted to see if there was any reason beyond needing it or requiring it (hence the names). I stumbled upon this statement:
Unlike
include(),require()will always read in the target file, even
if the line it’s on never executes. If you want to conditionally
include a file, useinclude(). The conditional statement won’t affect
therequire(). However, if the line on which therequire()occurs is
not executed, neither will any of the code in the target file be
executed.
The way I am interpreting it is that includes inside conditionals that do not end up running, will not actually include it in there, which to me seems less costly to the server. I am just curious if this is true. I did not see it in the manual, so I am skeptical.
If you have include inside a false statement, it will not get parsed. The same is true for require. The main and only difference is that require will check if the file exists even if it’s never executed. Well, this has been my experience with it, at least.
So, both only happen once executed, but require will show an error if the file doesn’t exist, regardless of whether it’s executed.