3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $d1 = new DateTime(); $d2 = (new DateTime($d1->format('Y-m-d')))->modify('+1 day'); $diff = $d1->format('N') - $d2->format('N'); echo $d2->format('Y-m-d'); $d2->add(new DateInterval('P1D'));
based on hOFgB
Output for 5.6.28, 7.0.20 - 7.3.0beta1
2016-05-28
Output for 5.5.0 - 5.6.22, 7.0.0 - 7.0.7
2016-05-29