dmartinezla
2/11/2015 - 9:12 AM

From https://eval.in/92997

<?php

function secondsToTime($seconds) {
	$dtF = new DateTime('@0');
	$dtT = new DateTime('@'.$seconds);
	return $dtF->diff($dtT)->format('%a days, %h hours, %i minutes and %s seconds');
}

echo secondsToTime(1640467);