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; ?>
Output for 5.4.0 - 5.4.28
Parse error: syntax error, unexpected '$days' (T_VARIABLE) in /in/mgru3 on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE in /in/mgru3 on line 12
Process exited with code 255.