Is anyone using php7.4? Are you using preloading for elk? I'm interested in experimenting with preloading. Knowledge to pull it off is lacking. Apparently the initiation script must include an array of all php files in the script (here, elk) as well as appropriate classes and namespaces. Seems it may be a daunting task for the uh, lesser codeworthy. How difficult would this be?
Is anyone using php7.4?
Are you using preloading for elk?
How difficult would this be?
Not sure. Haven't tried it yet.
Well, the "quick&dirty" way would be to take any file in sources, themes and the root and require_once all of them.
Only thing to pay attention should be the order to avoid issues, but if you start instantiating the bootstrap class and loading the autoloader, that should do most of the work.
It may be something like:
$forum_path = '/path/to/forum';
$root_files = [
function getFilesRecursive($dir, $ext = '.php')
$full_paths = array();
$iterator = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS),
$filter = new RegexIterator($iterator, '/' . preg_quote($ext) . '$/');
foreach ($filter as $path => $file)
if ($file->isDir() === false)
$full_paths = $path;
require_once($forum_path . '/bootstrap.php');
$source_files = getFilesRecursive($forum_path . '/sources');
$themes_files = getFilesRecursive($forum_path . '/themes');
foreach ($root_files as $k => $file)
$root_files[$k] = $forum_path . '/' . $root_files[$k];
foreach ([$source_files, $themes_files, $root_files] as $files)
foreach ($files as $file)
No idea if it works or not.