I am using PHP 5.6 on Linux. I am getting a list of files and directories in a directory
$directory_listing = scandir($path);
I know I could do something similar to following to get an array of the filenames plus modified date and size.
$listings_final = array();
foreach ($directory_listing as $listing) {
$listings_final[]['listing_name'] = $listing;
$listings_final[]['listing_modified'] = filemtime($listing);
$listings_final[]['listing_size'] = filesize($listing);
}
This will be slow when the number of files is extremely large. Is there a more performant way to archive this?