<?php
function GetMicroTime()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$start = memory_get_usage();
$timestart = GetMicroTime(); // START TIME
class Objekt {
public $var;
}
$obj = new Objekt();
$obj->var = 200;
unset($obj);
$time = GetMicroTime() - $timestart;
printf("<strong>%0.8f</strong> sec", $time);
printf("<strong>%0.8f</strong> mem", memory_get_usage() - $start);
highlight_file(__FILE__);
?>