<?php




function format_milliseconds_to_readable_time($timeInSeconds)
{
	// Convert milliseconds to seconds with PHP_ROUND_HALF_UP.
	$seconds = (int) $timeInSeconds;

	// Calculate hours, minutes, and seconds

	$minutes = floor($seconds / 60);
	$seconds %= 60;

	// Format the result in "H:i:s" format.(int) $string;
	$timeFormat = sprintf('%02d:%02d', $minutes, $seconds);

	return $timeFormat;
	// Output: 00:20:35


}
