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', $end) . " " . date('Y-m-d', $start); ?>
Output for 5.1.0 - 7.1.0
Notice: Undefined variable: days in /in/dG3Wh on line 9 Notice: A non well formed numeric value encountered in /in/dG3Wh on line 9 Notice: A non well formed numeric value encountered in /in/dG3Wh on line 9 1970-01-01 1970-01-01
Output for 5.0.4 - 5.0.5
Notice: Undefined variable: days in /in/dG3Wh on line 9 1970-01-01 1970-01-01
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: days in /in/dG3Wh on line 9 1970-01-01 1970-01-01