You can use filemtime() to get the modification time for a file.
Amber
2009-12-01 19:14:17
If you want to get timestamp of the last modification of the current file you can use code below:
<?php
$stat = (stat(__FILE__));
echo 'Document last updated: ', date('M d Y', $stat['mtime']);
?>
Why not use one of the php cacheing options out there? PHP Accelerator or PHP:APC? These provide a ready rolled solution for what you want.