3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $oDate = new \DateTime(); var_dump($oDate->modify('first day of January this year'));
Output for 5.3.29
object(DateTime)#1 (3) { ["date"]=> string(19) "2017-01-01 18:00:04" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.27
object(DateTime)#1 (3) { ["date"]=> string(19) "2017-01-01 18:00:12" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.9
object(DateTime)#1 (3) { ["date"]=> string(19) "2017-01-01 18:00:18" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.3
object(DateTime)#1 (3) { ["date"]=> string(19) "2017-07-01 17:59:43" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for 5.3.2
object(DateTime)#1 (3) { ["date"]=> string(19) "2017-07-01 17:59:52" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }