3v4l.org

run code in 300+ PHP versions simultaneously
<?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.31, 8.2.0 - 8.2.26, 8.3.0 - 8.3.14, 8.4.1
string(2) "00" string(2) "08" string(2) "10" string(5) "38474"

preferences:
81.3 ms | 406 KiB | 5 Q