3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $start = date('Y-m-d H:m:s'); $end = date('Y-m-d H:m:s', strtotime($start . ' +24 hours')); //$days = date('Y-m-d', $end) - date('Y-m-d', $start); echo $days . " " . date('Y-m-d', strtotime($end)) . " " . date('Y-m-d', strtotime($start)); ?>
Output for 5.0.4 - 7.1.0
Notice: Undefined variable: days in /in/JAVIg on line 9 2014-05-14 2014-05-13
Output for 4.3.6 - 5.0.3
Notice: Undefined variable: days in /in/JAVIg on line 9 2014-05-14 2014-05-13
Output for 4.3.0 - 4.3.5
Notice: Undefined variable: days in /in/JAVIg on line 9 2014-05-12 2014-05-13