收集整理的非常有用的PHP函数
PHP计算时长
function changeTimeType($seconds) {
if ($seconds > 3600) {
$hours = intval($seconds / 3600);
$minutes = $seconds % 3600;
$time = $hours . ":" . gmstrftime('%M:%S', $minutes);
} else {
$time = gmstrftime('%H:%M:%S', $seconds);
}
return $time;
}
系统已运行:96468:35:41