<?php
$t1 = '00:08:10.38474';
if (preg_match('/^(\d{2}):(\d{2}):(\d{2})\.(\d{5})$/', $t1, $matches)) {
[, $hours, $minutes, $seconds, $milliseconds] = $matches;
var_dump($hours, $minutes, $seconds, $milliseconds); // "00", "08", "10", "38474"
}
- Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.25, 8.4.1 - 8.4.12
- string(2) "00"
string(2) "08"
string(2) "10"
string(5) "38474"
preferences:
138.99 ms | 407 KiB | 5 Q