3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(unserialize(serialize(new DateTime("2013-02-02T00:00:00Z")))); var_dump(unserialize(serialize(new DateTime("2013-02-02T00:00:00Y"))));
Output for 5.4.30 - 7.2.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-02 00:00:00.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "Z" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-02-02 00:00:00.000000" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "Y" }
Output for 5.3.18 - 5.4.29
object(DateTime)#1 (3) { ["date"]=> string(19) "2013-02-02 00:00:00" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "Z" } object(DateTime)#1 (3) { ["date"]=> string(19) "2013-02-02 00:00:00" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "Y" }