time.function.php '年', '2592000'='个月', '604800'='星期', '86400'='天', '3600'='小时', '60'='分钟', '1'='秒' ); foreach ($f as $k=$v) { if (0 !=$c=floor($t/(int)$k)) { return $c.$v.'前'; } }}//memery used...$start_mem = memory_
'年', '2592000'=>'个月', '604800'=>'星期', '86400'=>'天', '3600'=>'小时', '60'=>'分钟', '1'=>'秒' ); foreach ($f as $k=>$v) { if (0 !=$c=floor($t/(int)$k)) { return $c.$v.'前'; } } } //memery used... $start_mem = memory_get_usage(); //code... $end_mem = memory_get_usage(); $memused = $end_mem - $start_mem; $memused_str = sprintf('memory usage: %01.9f MB', $memused/1024/1024);