public function formatUptime($uptime)
    {
        $days = floor($uptime / 24 / 60 / 60);
        $days_remainder = $uptime - ($days * 24 * 60 * 60);
        $hours = floor($days_remainder / 60 / 60);
        $hours_remainder = $days_remainder - ($hours * 60 * 60);
        $minutes = floor($hours_remainder / 60);
        $minutes_remainder = $hours_remainder - ($minutes * 60);
        $seconds = $minutes_remainder;
        $out = $uptime . ' seconds (';

        if ($days > 0) {
            $out .= $days . ' days, ';
        }

        if ($hours > 0) {
            $out .= $hours . ' hours, ';
        }


        if ($minutes > 0) {
            $out .= $minutes . ' minutes, ';
        }


        if ($seconds > 0) {
            $out .= $seconds . ' seconds';
        }

        return $out . ')';
    }
public function formatUptime($uptime)
    {
        $days = floor($uptime / 24 / 60 / 60);
        $days_remainder = $uptime - ($days * 24 * 60 * 60);
        $hours = floor($days_remainder / 60 / 60);
        $hours_remainder = $days_remainder - ($hours * 60 * 60);
        $minutes = floor($hours_remainder / 60);
        $minutes_remainder = $hours_remainder - ($minutes * 60);
        $seconds = $minutes_remainder;
        $out = $uptime . ' seconds (';

        if ($days > 0) {
            $out .= $days . ' days, ';
        }

        if ($hours > 0) {
            $out .= $hours . ' hours, ';
        }


        if ($minutes > 0) {
            $out .= $minutes . ' minutes, ';
        }


        if ($seconds > 0) {
            $out .= $seconds . ' seconds';
        }

        return $out . ')';
    }
public function formatUptime ( $ uptime ) { $ days = floor ( $ uptime / 24 / 60 / 60 ) ; $ days_remainder = $ uptime - ( $ days * 24 * 60 * 60 ) ; $ hours = floor ( $ days_remainder / 60 / 60 ) ; $ hours_remainder = $ days_remainder - ( $ hours * 60 * 60 ) ; $ minutes = floor ( $ hours_remainder / 60 ) ; $ minutes_remainder = $ hours_remainder - ( $ minutes * 60 ) ; $ seconds = $ minutes_remainder ; $ out = $ uptime . ' seconds (' ; if ( $ days > 0 ) { $ out .= $ days . ' days, ' ; } if ( $ hours > 0 ) { $ out .= $ hours . ' hours, ' ; } if ( $ minutes > 0 ) { $ out .= $ minutes . ' minutes, ' ; } if ( $ seconds > 0 ) { $ out .= $ seconds . ' seconds' ; } return $ out . ')' ; }
Formats the uptime to be friendlier

@param integer $uptime Cache server uptime (in seconds)
@return string A short string with friendly formatting
Formats the uptime to be friendlier