3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo "Now: ", $now = strtotime("now"), "\n"; echo "Then: ", $then = strtotime("now -2 years"), "\n"; echo "400 years ago: ", $now2 = strtotime("now -6 years"), "\n"; echo "420 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 "Simple: ", $simple = 2*365*24, " hours\n"; echo "Dif1 to dif2 ", $dif1 - $dif2, "hours\n"; echo "Dif1 to simple ", $dif1 - $simple, "hours\n";
based on mpO4P
Output for 5.6.28, 7.0.20 - 7.2.0
Now: 1453302810 Then: 1390230810 400 years ago: 1264000410 420 years ago: 1200842010 Dif 1: 17520 hours Dif 2: 17544 hours Simple: 17520 hours Dif1 to dif2 -24hours Dif1 to simple 0hours
Output for 7.0.6
Now: 1463832327 Then: 1400673927 400 years ago: 1274443527 420 years ago: 1211371527 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 7.0.5
Now: 1459670383 Then: 1396511983 400 years ago: 1270281583 420 years ago: 1207209583 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 7.0.4
Now: 1457644066 Then: 1394485666 400 years ago: 1268255266 420 years ago: 1205183266 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 7.0.3
Now: 1458340975 Then: 1395182575 400 years ago: 1268952175 420 years ago: 1205880175 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 7.0.2
Now: 1458708624 Then: 1395550224 400 years ago: 1269319824 420 years ago: 1206247824 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 7.0.1
Now: 1458805938 Then: 1395647538 400 years ago: 1269417138 420 years ago: 1206345138 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 7.0.0
Now: 1459068312 Then: 1395913512 400 years ago: 1269683112 420 years ago: 1206611112 Dif 1: 17543 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 23hours Dif1 to simple 23hours
Output for 5.6.21
Now: 1462200881 Then: 1399042481 400 years ago: 1272812081 420 years ago: 1209740081 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 5.6.20
Now: 1460271731 Then: 1397113331 400 years ago: 1270882931 420 years ago: 1207810931 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 5.6.19
Now: 1457414265 Then: 1394255865 400 years ago: 1268025465 420 years ago: 1204953465 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 5.6.18
Now: 1458051424 Then: 1394893024 400 years ago: 1268662624 420 years ago: 1205590624 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 5.6.17
Now: 1458438559 Then: 1395280159 400 years ago: 1269049759 420 years ago: 1205977759 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 5.6.16
Now: 1459157698 Then: 1396002898 400 years ago: 1269768898 420 years ago: 1206700498 Dif 1: 17543 hours Dif 2: 17519 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 23hours
Output for 5.6.15
Now: 1459247090 Then: 1396092290 400 years ago: 1269858290 420 years ago: 1206789890 Dif 1: 17543 hours Dif 2: 17519 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 23hours
Output for 5.6.14
Now: 1460650043 Then: 1397491643 400 years ago: 1271261243 420 years ago: 1208189243 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 5.6.13
Now: 1460738793 Then: 1397580393 400 years ago: 1271349993 420 years ago: 1208277993 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 5.6.12
Now: 1461136626 Then: 1397978226 400 years ago: 1271747826 420 years ago: 1208675826 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 5.6.11
Now: 1461505377 Then: 1398346977 400 years ago: 1272116577 420 years ago: 1209044577 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 5.6.10
Now: 1461599315 Then: 1398440915 400 years ago: 1272210515 420 years ago: 1209138515 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 5.6.9
Now: 1461791817 Then: 1398633417 400 years ago: 1272403017 420 years ago: 1209331017 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 5.6.8
Now: 1461994958 Then: 1398836558 400 years ago: 1272606158 420 years ago: 1209534158 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 5.5.35
Now: 1463965232 Then: 1400806832 400 years ago: 1274576432 420 years ago: 1211504432 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 5.5.34
Now: 1460366221 Then: 1397207821 400 years ago: 1270977421 420 years ago: 1207905421 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 5.5.33
Now: 1457511780 Then: 1394353380 400 years ago: 1268122980 420 years ago: 1205050980 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 5.5.32
Now: 1458238580 Then: 1395080180 400 years ago: 1268849780 420 years ago: 1205777780 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 5.5.31
Now: 1458536605 Then: 1395378205 400 years ago: 1269147805 420 years ago: 1206075805 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 5.5.30
Now: 1459512954 Then: 1396354554 400 years ago: 1270124154 420 years ago: 1207052154 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 5.5.29
Now: 1460876643 Then: 1397718243 400 years ago: 1271487843 420 years ago: 1208415843 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 5.5.28
Now: 1461234992 Then: 1398076592 400 years ago: 1271846192 420 years ago: 1208774192 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 5.5.27
Now: 1461327224 Then: 1398168824 400 years ago: 1271938424 420 years ago: 1208866424 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 5.5.26
Now: 1461695410 Then: 1398537010 400 years ago: 1272306610 420 years ago: 1209234610 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 5.5.25
Now: 1461895026 Then: 1398736626 400 years ago: 1272506226 420 years ago: 1209434226 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 5.5.24
Now: 1464078525 Then: 1400920125 400 years ago: 1274689725 420 years ago: 1211617725 Dif 1: 17544 hours Dif 2: 17520 hours Simple: 17520 hours Dif1 to dif2 24hours Dif1 to simple 24hours
Output for 5.4.44 - 5.4.45
Now: 1453302813 Then: 1390230813 400 years ago: 1264000413 420 years ago: 1200842013 Dif 1: 17520 hours Dif 2: 17544 hours Simple: 17520 hours Dif1 to dif2 -24hours Dif1 to simple 0hours
Output for 5.4.42 - 5.4.43
Now: 1453302814 Then: 1390230814 400 years ago: 1264000414 420 years ago: 1200842014 Dif 1: 17520 hours Dif 2: 17544 hours Simple: 17520 hours Dif1 to dif2 -24hours Dif1 to simple 0hours
Output for 5.4.41
Now: 1453302815 Then: 1390230815 400 years ago: 1264000415 420 years ago: 1200842015 Dif 1: 17520 hours Dif 2: 17544 hours Simple: 17520 hours Dif1 to dif2 -24hours Dif1 to simple 0hours
Output for 5.4.39 - 5.4.40
Now: 1453302816 Then: 1390230816 400 years ago: 1264000416 420 years ago: 1200842016 Dif 1: 17520 hours Dif 2: 17544 hours Simple: 17520 hours Dif1 to dif2 -24hours Dif1 to simple 0hours
Output for 5.4.36 - 5.4.38
Now: 1453302817 Then: 1390230817 400 years ago: 1264000417 420 years ago: 1200842017 Dif 1: 17520 hours Dif 2: 17544 hours Simple: 17520 hours Dif1 to dif2 -24hours Dif1 to simple 0hours
Output for 5.4.34 - 5.4.35
Now: 1453302818 Then: 1390230818 400 years ago: 1264000418 420 years ago: 1200842018 Dif 1: 17520 hours Dif 2: 17544 hours Simple: 17520 hours Dif1 to dif2 -24hours Dif1 to simple 0hours
Output for 5.3.29, 5.4.31 - 5.4.32
Now: 1453302819 Then: 1390230819 400 years ago: 1264000419 420 years ago: 1200842019 Dif 1: 17520 hours Dif 2: 17544 hours Simple: 17520 hours Dif1 to dif2 -24hours Dif1 to simple 0hours
Output for 5.4.28 - 5.4.30
Now: 1453302820 Then: 1390230820 400 years ago: 1264000420 420 years ago: 1200842020 Dif 1: 17520 hours Dif 2: 17544 hours Simple: 17520 hours Dif1 to dif2 -24hours Dif1 to simple 0hours
Output for 5.4.24 - 5.4.27
Now: 1453302821 Then: 1390230821 400 years ago: 1264000421 420 years ago: 1200842021 Dif 1: 17520 hours Dif 2: 17544 hours Simple: 17520 hours Dif1 to dif2 -24hours Dif1 to simple 0hours
Output for 5.3.28, 5.4.21 - 5.4.23
Now: 1453302822 Then: 1390230822 400 years ago: 1264000422 420 years ago: 1200842022 Dif 1: 17520 hours Dif 2: 17544 hours Simple: 17520 hours Dif1 to dif2 -24hours Dif1 to simple 0hours
Output for 5.4.18 - 5.4.20
Now: 1453302823 Then: 1390230823 400 years ago: 1264000423 420 years ago: 1200842023 Dif 1: 17520 hours Dif 2: 17544 hours Simple: 17520 hours Dif1 to dif2 -24hours Dif1 to simple 0hours
Output for 5.3.25 - 5.3.27, 5.4.15 - 5.4.17
Now: 1453302824 Then: 1390230824 400 years ago: 1264000424 420 years ago: 1200842024 Dif 1: 17520 hours Dif 2: 17544 hours Simple: 17520 hours Dif1 to dif2 -24hours Dif1 to simple 0hours
Output for 5.3.22 - 5.3.24, 5.4.12 - 5.4.14
Now: 1453302825 Then: 1390230825 400 years ago: 1264000425 420 years ago: 1200842025 Dif 1: 17520 hours Dif 2: 17544 hours Simple: 17520 hours Dif1 to dif2 -24hours Dif1 to simple 0hours