3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo "Now: ", $now = strtotime("now"), "\n"; echo "Then: ", $then = strtotime("now -20 years"), "\n"; echo $now2 = strtotime("now +1 year"), "\n"; echo $then2 = strtotime("now -19 years"), "\n"; echo "Dif 1: ", ($now-$then) / 60 / 60, " hours\n"; echo "Dif 2: ", ($now2-$then2) / 60 / 60, " hours\n"; echo "Simple: ", 20*365*24, " hours\n";
based on PF9bE
Output for 5.6.28, 7.0.20 - 7.2.0
Now: 1453302332 Then: 822150332 1484924732 853772732 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 7.0.6
Now: 1463832321 Then: 832680321 1495368321 864216321 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 7.0.5
Now: 1459670378 Then: 828518378 1491206378 860054378 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 7.0.4
Now: 1457644061 Then: 826492061 1489180061 858028061 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 7.0.3
Now: 1458340970 Then: 827188970 1489876970 858724970 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 7.0.2
Now: 1458708618 Then: 827556618 1490244618 859092618 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 7.0.1
Now: 1458805933 Then: 827653933 1490341933 859189933 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 7.0.0
Now: 1459068307 Then: 827919907 1490604307 859455907 Dif 1: 175319 hours Dif 2: 175319 hours Simple: 175200 hours
Output for 5.6.21
Now: 1462200876 Then: 831048876 1493736876 862584876 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.6.20
Now: 1460271726 Then: 829119726 1491807726 860655726 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.6.19
Now: 1457414260 Then: 826262260 1488950260 857798260 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.6.18
Now: 1458051419 Then: 826899419 1489587419 858435419 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.6.17
Now: 1458438553 Then: 827286553 1489974553 858822553 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.6.16
Now: 1459157693 Then: 828009293 1490693693 859545293 Dif 1: 175319 hours Dif 2: 175319 hours Simple: 175200 hours
Output for 5.6.15
Now: 1459247085 Then: 828098685 1490783085 859634685 Dif 1: 175319 hours Dif 2: 175319 hours Simple: 175200 hours
Output for 5.6.14
Now: 1460650038 Then: 829498038 1492186038 861034038 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.6.13
Now: 1460738787 Then: 829586787 1492274787 861122787 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.6.12
Now: 1461136622 Then: 829984622 1492672622 861520622 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.6.11
Now: 1461505372 Then: 830353372 1493041372 861889372 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.6.10
Now: 1461599311 Then: 830447311 1493135311 861983311 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.6.9
Now: 1461791812 Then: 830639812 1493327812 862175812 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.6.8
Now: 1461994953 Then: 830842953 1493530953 862378953 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.5.35
Now: 1463965226 Then: 832813226 1495501226 864349226 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.5.34
Now: 1460366216 Then: 829214216 1491902216 860750216 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.5.33
Now: 1457511775 Then: 826359775 1489047775 857895775 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.5.32
Now: 1458238574 Then: 827086574 1489774574 858622574 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.5.31
Now: 1458536598 Then: 827384598 1490072598 858920598 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.5.30
Now: 1459512950 Then: 828360950 1491048950 859896950 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.5.29
Now: 1460876638 Then: 829724638 1492412638 861260638 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.5.28
Now: 1461234987 Then: 830082987 1492770987 861618987 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.5.27
Now: 1461327219 Then: 830175219 1492863219 861711219 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.5.26
Now: 1461695406 Then: 830543406 1493231406 862079406 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.5.25
Now: 1461895022 Then: 830743022 1493431022 862279022 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.5.24
Now: 1464078521 Then: 832926521 1495614521 864462521 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.4.45
Now: 1453302335 Then: 822150335 1484924735 853772735 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.4.43 - 5.4.44
Now: 1453302336 Then: 822150336 1484924736 853772736 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.4.41 - 5.4.42
Now: 1453302337 Then: 822150337 1484924737 853772737 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.4.40
Now: 1453302338 Then: 822150338 1484924738 853772738 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.4.37 - 5.4.39
Now: 1453302339 Then: 822150339 1484924739 853772739 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.4.34 - 5.4.36
Now: 1453302340 Then: 822150340 1484924740 853772740 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.3.29, 5.4.32
Now: 1453302341 Then: 822150341 1484924741 853772741 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.4.28 - 5.4.31
Now: 1453302342 Then: 822150342 1484924742 853772742 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.4.24 - 5.4.27
Now: 1453302343 Then: 822150343 1484924743 853772743 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.3.28, 5.4.21 - 5.4.23
Now: 1453302344 Then: 822150344 1484924744 853772744 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.4.18 - 5.4.20
Now: 1453302345 Then: 822150345 1484924745 853772745 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.3.25 - 5.3.27, 5.4.15 - 5.4.17
Now: 1453302346 Then: 822150346 1484924746 853772746 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours
Output for 5.3.22 - 5.3.24, 5.4.12 - 5.4.14
Now: 1453302347 Then: 822150347 1484924747 853772747 Dif 1: 175320 hours Dif 2: 175320 hours Simple: 175200 hours