$mmtime = (stat($file))[9]; if ($mmtime > 600){do something ....} ; ## note that these are seconds, 10 min = 600 sec