File Direktori Daftar PHP berdasarkan Tanggal

function listdir_by_date($path){

  $ar = [];
  chdir($path);
  array_multisort(array_map('filemtime', ($files = glob("*.*"))), SORT_DESC, $files);
  foreach($files as $filename)
  {
    $ar[] = $filename;
  }

  return $ar;
}
A.Tsiokos