Last active
June 22, 2018 19:30
-
-
Save steverobbins/960c0c03353fc7a696230e1487ac1cf6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$files = glob('*'); | |
$reports = array(); | |
foreach ($files as $file) { | |
if (!is_numeric($file)) { | |
continue; | |
} | |
$time = filemtime($file); | |
$content = unserialize(file_get_contents($file)); | |
$reports[] = array($time, $content, $file); | |
} | |
usort($reports, 'doSort'); | |
foreach ($reports as $r) { | |
echo date('Y-m-d H:i:s', $r[0]), ' (', $r[2], '): ', str_replace("\n", ' ', $r[1][0]), PHP_EOL; | |
} | |
function doSort($a, $b) | |
{ | |
return $a[0] - $b[0]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment