3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $to_date = time("2014-01-02"); // Input your date here e.g. strtotime("2014-01-02") $from_date = strtotime("2012-01-31"); $day_diff = $to_date - $from_date; echo floor($day_diff/(60*60*24)); ?>
Output for 4.3.0 - 5.6.28, 7.0.0 - 7.1.0
863
Output for hhvm-3.12.0
Warning: time() expects exactly 0 parameters, 1 given in /in/mcss2 on line 2 -15370
Output for hhvm-3.10.0
Warning: time() expects exactly 0 parameters, 1 given in /in/mcss2 on line -1 -15370