如何使用PHP获取时间值与Excel中的TIMEVALUE()函数相同

Here I have one string contain "00:01:00" in Excel sheet, now I will pass this string to TIMEVALUE() function of Excel to return 0.000694 same way I want in PHP.

Is there any function for performing this task, or any other way to achieve this goal?

An Excel timestamp is just a float where 24 hours is 1 day, so one hour is 1/24th.

Calculate the difference between the timestamp values for 00:01:00 and 00:00:00, then divide by the number of seconds in a day

$x = strtotime("00:01:00");
$y = strtotime("00:00:00");

echo ($x - $y) / 86400, PHP_EOL;