Assuming the PHP version> = 5.2, which is the best management solution, includes:
require_once DEFPATH . 'config.inc.php';
or
if (!defined('FOOBAR')) require DEFPATH . 'config.inc.php';
or something completely different?
The site does not use a front-end controller or autoloader. A typical number of files to be included is 3 to 8.
I heard here and elsewhere that require_onceadds overhead and doesn't play well with caching. But I also heard that a small number of statements require_onceare normal in practice in later versions of PHP.
There should also be some overhead associated with the verification, if something is defined, but this may be less of a problem.
In general, what is best practice and why?