3v4l.org

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

preferences:
44.38 ms | 402 KiB | 5 Q