3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $spd = (60 * 60 * 24); $sph = (60 * 60); $spm = (60); $start = date('Y-m-d H:m:s'); $end = date('Y-m-d H:m:s', strtotime($start . ' +24 hours')); $sec_diff = strtotime($end) - strtotime($start); //$days = $sec_diff / $spd; //$hours = ($sec_diff - ($days * $spd)) / $sph; // echo $days . " " . $hours; echo $sec_diff; ?>
Output for 4.3.6 - 7.1.0
86400
Output for 4.3.0 - 4.3.5
-75600