3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dt = new DateTime( '2017-05-16T10:11:32', new DateTimeZone('CEST') ); var_dump($dt); var_dump($dt->format('c'));
Output for 8.0.21 - 8.0.22, 8.1.8 - 8.1.9
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-05-16 10:11:32.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "CEST" } string(25) "2017-05-16T10:11:32+02:00"
Output for 5.6.38 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.30, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.30, 8.0.0 - 8.0.20, 8.1.0 - 8.1.7
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-05-16 10:11:32.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(4) "CEST" } string(25) "2017-05-16T10:11:32+01:00"

preferences:
34.99 ms | 412 KiB | 5 Q