<?php
foreach (glob("blocks/*.php") as $filename) {
include $filename;
}
?>
$files = glob("blocks/*.php");
$result = [];
foreach ($files as $filename) {
$time = \filectime($filename);
$result[$time] = $filename;
}
ksort($result);
foreach ($result as $file) {
include($file);
}