如何在PHP中将两次时间与毫秒进行比较?是的,我有这样的时候:
- 00:38.673
- 00:38.652
试试这个:
// Parses the inputed string
sscanf('00:38.673', "%d:%d.%d", $minutes, $seconds, $miliseconds);
// Convert it to miliseconds
$mseconds = $seconds * 1000 + $minutes * 60 * 1000 + $miliseconds;