3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = strtotime('2014-01-15'); #$date = '2014-01-15'; echo date('Y-m-d',$date).PHP_EOL; $daysbefor1979 = '25568'; $start = strtotime("1900-01-01"); echo $start.PHP_EOL; $diff = ($date - $start); echo $diff.PHP_EOL; $days = ($diff / 86400); echo $days.PHP_EOL; /*echo date('Y-m-d', jdtounix(gregoriantojd(12, 31, 1899) + 41603)).PHP_EOL;*/ $erg = round(($daysbefor1979+$days), 0); echo $erg.PHP_EOL; $days1 = round(($days-$daysbefor1979), 0); echo $days1.PHP_EOL; $diff1 = ($days1*86400); echo $diff1.PHP_EOL;
based on IFoig
Output for 5.5.0 - 7.2.0
2014-01-15 -2208989972 3598730372 41651.971898148 67220 16084 1389657600