3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function dateCompare($a, $b) { $t1 = strtotime($a); $t2 = strtotime($b); return $t1 - $t2; } print dateCompare('2013-12-02', '2013-12-06'); print dateCompare('2013-12-02', '2013-12-06')/24;
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
-345600-14400