//в header
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime
[0];
$tstart = $mtime;
//в footer
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime
[0];
$tend = $mtime;
$totaltime = round(($tend -
$tstart)*1000, 2);
$mem = round
(memory_get_usage
() / 1024, 2);
echo 'Gzip: '. $mem.' byte</
br> Gen: '.$totaltime.'
sec';