I Have a log reading program written in PHP. I want to calculate the time difference of any given two log lines.
I found lot of code for calculating the time difference if the two times are give like

$time1='10:15:30'; and $time2='10:15:35';. here the time difference will be 5 seconds.

But here my input times will be as in the following format
$time1='10:15:30:300'; and $time2='11:15:35:450';

I want a function which will receive this times as inputs and give the time difference in milliseconds.

Is there any inbuilt php function that can be utilized for this purpose ? or should we write our custom logic to split this time and then calculate the difference ?