Are there built-in PHP functions that can handle time formatting with milliseconds included?

To handle time formatting with milliseconds included in PHP, you can use the `DateTime` class along with the `format()` method. The `u` format character can be used to include milliseconds in the time format string. This allows you to easily format a timestamp with milliseconds included.

$dateTime = new DateTime();
$milliseconds = $dateTime->format('u');
echo $dateTime->format('Y-m-d H:i:s') . '.' . $milliseconds;