3v4l.org

run code in 300+ PHP versions simultaneously
<?php $current_time = strtotime(date('d-M-Y g:i:s A'));$one_week = 3600 * 24 * 7;// your file code$fword = $arr[0]; // assuming that $fword has file date.// $fword = str_replace("/", "-", $fword);$file_time = strtotime($fword);$diff = $current_time - $file_time;if($diff>$one_week){ echo " date : ".$fowrd." is older than one week <br/>";}else { echo " date : ".$fowrd." is not older than one week <br/>"; }</php>

preferences:
32.75 ms | 402 KiB | 5 Q