3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $d1 = Datetime::createFromFormat("Y-m-d", "2017-07-29"); $tmp = clone $d1; var_dump($tmp->format('D')); $d2 = Datetime::createFromFormat("Y-m-d", "2017-07-31"); $d2->modify('+1 day'); var_dump($d2);
based on T8rvm
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0rc3
string(3) "Sat" object(DateTime)#3 (3) { ["date"]=> string(26) "2017-08-01 05:00:28.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }