Are there any predefined PHP functions or libraries that offer more elegant solutions for converting seconds to higher time units without the need for multiple conditional statements?

When converting seconds to higher time units like hours, minutes, and days, using multiple conditional statements can be cumbersome and prone to errors. One elegant solution is to utilize the `DateInterval` class in PHP, which can handle the conversion effortlessly. By creating a `DateInterval` object with the total number of seconds and then formatting it to retrieve the desired time units, you can achieve a more concise and reliable solution.

function convertSecondsToTimeUnits($seconds) {
    $interval = new DateInterval('PT' . $seconds . 'S');
    
    $hours = $interval->format('%h');
    $minutes = $interval->format('%i');
    $days = $interval->format('%a');

    return "Days: $days, Hours: $hours, Minutes: $minutes";
}

// Example usage
$seconds = 86400; // 1 day
echo convertSecondsToTimeUnits($seconds);