3v4l.org

run code in 300+ PHP versions simultaneously
<?php $format = 'Y-m-d H:i:s.vP'; $date = '2019-08-15 06:31:32.829Z'; var_dump(\DateTime::createFromFormat($format, $date));
Output for 7.3.0 - 7.3.28, 7.4.0 - 7.4.21, 8.0.0 - 8.0.8
object(DateTime)#1 (3) { ["date"]=> string(26) "2019-08-15 06:31:32.829000" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "Z" }
Output for 7.1.25 - 7.1.33, 7.2.0 - 7.2.33
bool(false)

preferences:
244.16 ms | 460 KiB | 5 Q