I have this ISO 8601 time period string: P0Y0M0DT3H5M0.000S and PHP7.4 fails to construct a DateInterval with it.
<?php
$d = new \DateInterval('P0Y0M0DT3H5M0.000S');
var_dump($d);
Fatal error: Uncaught Exception: DateInterval::__construct(): Unknown or bad format (P0Y0M0DT3H5M1.33S) in [...][...]:2
It fails for the milliseconds. When I omit the milliseconds -P0Y0M0DT3H5M0S- it works fine.
With milliseconds it should be a valid ISO 8601 string afaik.
According to Wikipedia this is the format:
[Start]P[JY][MM][WW][TD][T[hH][mM][s[.f]S]]
https://de.wikipedia.org/wiki/ISO_8601#Zeitspannen
Why doesnt PHP accept this format and how can I work around this?