3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "Now: ", $now = strtotime("now"), "\n"; echo "Then: ", $then = strtotime("now -20 years"), "\n"; echo "400 years ago: ", $now2 = strtotime("now -400 years"), "\n"; echo "420 years ago: ", $then2 = strtotime("now -420 years"), "\n"; echo "Dif 1: ", ($now-$then) / 60 / 60, " hours\n"; echo "Dif 2: ", $dif2 = ($now2-$then2) / 60 / 60, " hours\n"; echo "Simple: ", $simple = 20*365*24, " hours\n"; echo "Dif1 to dif2 ", $dif1 - $dif2, "hours\n"; echo "Dif1 to simple ", $dif2 - $simple, "hours\n";

preferences:
61.6 ms | 402 KiB | 5 Q