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 . " " . $start . " " . $end; ?>
Output for 7.1.0
Notice: A non well formed numeric value encountered in /in/AIYS8 on line 6 Notice: A non well formed numeric value encountered in /in/AIYS8 on line 6 Notice: A non well formed numeric value encountered in /in/AIYS8 on line 6 Notice: A non well formed numeric value encountered in /in/AIYS8 on line 6 0 2014-05-13 15:05:49 2014-05-14 15:05:49
Output for 5.1.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.0.14
Notice: A non well formed numeric value encountered in /in/AIYS8 on line 6 Notice: A non well formed numeric value encountered in /in/AIYS8 on line 6 0 2014-05-13 15:05:49 2014-05-14 15:05:49
Output for 4.3.6 - 5.0.5, hhvm-3.10.0
0 2014-05-13 15:05:49 2014-05-14 15:05:49
Output for 4.3.0 - 4.3.5
0 2014-05-13 15:05:49 2014-05-12 18:05:49