3v4l.org

run code in 200+ 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 7.1.0 - 7.3.0rc4
Notice: A non well formed numeric value encountered in /in/Rskso on line 6 Notice: A non well formed numeric value encountered in /in/Rskso on line 6 Notice: A non well formed numeric value encountered in /in/Rskso on line 6 Notice: A non well formed numeric value encountered in /in/Rskso on line 6 Notice: A non well formed numeric value encountered in /in/Rskso on line 9 Notice: A non well formed numeric value encountered in /in/Rskso on line 9 0 1970-01-01 1970-01-01
Output for 5.1.0 - 7.0.20
Notice: A non well formed numeric value encountered in /in/Rskso on line 6 Notice: A non well formed numeric value encountered in /in/Rskso on line 6 Notice: A non well formed numeric value encountered in /in/Rskso on line 9 Notice: A non well formed numeric value encountered in /in/Rskso on line 9 0 1970-01-01 1970-01-01
Output for 4.3.0 - 5.0.5
0 1970-01-01 1970-01-01