Is there an easy way to programmatically require all files in a folder?
Solution using opendir, readdir, closedir. This also includes subdirectories.
4 && substr($fullfile,-4) == '.php') { require $fullfile; } } } closedir($dirhandle); } //Call like _require_all(__DIR__ . '/../vendor/vlucas/phpdotenv/src');