3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // $date_fail = date("Y-m-d H:i:s"); $date_fail = date_create(date("Y-m-d H:i:s")); var_dump($date_fail);
based on 6SYIM
Output for 5.5.14 - 5.6.5, 5.6.7 - 7.2.0
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-20 18:29:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.6.6
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-20 18:29:22.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.5.0 - 5.5.13
object(DateTime)#1 (3) { ["date"]=> string(19) "2015-11-20 18:29:23" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }