private static function secondsToDuration($seconds)
    {
        $seconds = intval($seconds);
        $hours = floor($seconds / 3600);
        $minutes = floor(($seconds / 60) % 60);
        $seconds = $seconds % 60;

        return "${hours}h ${minutes}m {$seconds}s";
    }
private static function secondsToDuration($seconds)
    {
        $seconds = intval($seconds);
        $hours = floor($seconds / 3600);
        $minutes = floor(($seconds / 60) % 60);
        $seconds = $seconds % 60;

        return "${hours}h ${minutes}m {$seconds}s";
    }
private static function secondsToDuration ( $ seconds ) { $ seconds = intval ( $ seconds ) ; $ hours = floor ( $ seconds / 3600 ) ; $ minutes = floor ( ( $ seconds / 60 ) % 60 ) ; $ seconds = $ seconds % 60 ; return "${hours}h ${minutes}m {$seconds}s" ; }
Seconds to Duration

Format a given number of $seconds into a duration with format [hours]:[minutes]:[seconds].

@param $seconds
@return string
Seconds to Duration