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, "\n"; echo "Dif 2: ", $now2-$then2, "\n"; echo "Simple: ", 20*365*24*60*60;
based on hsYqk
Output for 5.6.28, 7.0.20 - 7.2.0
Now: 1453300532 Then: 822148532 1484922932 853770932 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 7.0.6
Now: 1463832315 Then: 832680315 1495368315 864216315 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 7.0.5
Now: 1459670373 Then: 828518373 1491206373 860054373 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 7.0.4
Now: 1457644056 Then: 826492056 1489180056 858028056 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 7.0.3
Now: 1458340964 Then: 827188964 1489876964 858724964 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 7.0.2
Now: 1458708612 Then: 827556612 1490244612 859092612 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 7.0.1
Now: 1458805928 Then: 827653928 1490341928 859189928 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 7.0.0
Now: 1459068303 Then: 827919903 1490604303 859455903 Dif 1: 631148400 Dif 2: 631148400 Simple: 630720000
Output for 5.6.21
Now: 1462200871 Then: 831048871 1493736871 862584871 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.6.20
Now: 1460271721 Then: 829119721 1491807721 860655721 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.6.19
Now: 1457414255 Then: 826262255 1488950255 857798255 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.6.18
Now: 1458051413 Then: 826899413 1489587413 858435413 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.6.17
Now: 1458438545 Then: 827286545 1489974545 858822545 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.6.16
Now: 1459157687 Then: 828009287 1490693687 859545287 Dif 1: 631148400 Dif 2: 631148400 Simple: 630720000
Output for 5.6.15
Now: 1459247079 Then: 828098679 1490783079 859634679 Dif 1: 631148400 Dif 2: 631148400 Simple: 630720000
Output for 5.6.14
Now: 1460650033 Then: 829498033 1492186033 861034033 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.6.13
Now: 1460738782 Then: 829586782 1492274782 861122782 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.6.12
Now: 1461136617 Then: 829984617 1492672617 861520617 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.6.11
Now: 1461505357 Then: 830353357 1493041357 861889357 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.6.10
Now: 1461599306 Then: 830447306 1493135306 861983306 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.6.9
Now: 1461791795 Then: 830639795 1493327795 862175795 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.6.8
Now: 1461994948 Then: 830842948 1493530948 862378948 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.5.35
Now: 1463965219 Then: 832813219 1495501219 864349219 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.5.34
Now: 1460366211 Then: 829214211 1491902211 860750211 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.5.33
Now: 1457511770 Then: 826359770 1489047770 857895770 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.5.32
Now: 1458238568 Then: 827086568 1489774568 858622568 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.5.31
Now: 1458536589 Then: 827384589 1490072589 858920589 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.5.30
Now: 1459512945 Then: 828360945 1491048945 859896945 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.5.29
Now: 1460876632 Then: 829724632 1492412632 861260632 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.5.28
Now: 1461234981 Then: 830082981 1492770981 861618981 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.5.27
Now: 1461327204 Then: 830175204 1492863204 861711204 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.5.26
Now: 1461695401 Then: 830543401 1493231401 862079401 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.5.25
Now: 1461895017 Then: 830743017 1493431017 862279017 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.5.24
Now: 1464078514 Then: 832926514 1495614514 864462514 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.4.44 - 5.4.45
Now: 1453300535 Then: 822148535 1484922935 853770935 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.4.41 - 5.4.43
Now: 1453300536 Then: 822148536 1484922936 853770936 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.4.40
Now: 1453300537 Then: 822148537 1484922937 853770937 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.4.38 - 5.4.39
Now: 1453300538 Then: 822148538 1484922938 853770938 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.4.35 - 5.4.37
Now: 1453300539 Then: 822148539 1484922939 853770939 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.4.32 - 5.4.34
Now: 1453300540 Then: 822148540 1484922940 853770940 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.3.29, 5.4.29 - 5.4.31
Now: 1453300541 Then: 822148541 1484922941 853770941 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.4.26 - 5.4.28
Now: 1453300542 Then: 822148542 1484922942 853770942 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.4.23 - 5.4.25
Now: 1453300543 Then: 822148543 1484922943 853770943 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.3.28, 5.4.20 - 5.4.22
Now: 1453300544 Then: 822148544 1484922944 853770944 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.4.18 - 5.4.19
Now: 1453300545 Then: 822148545 1484922945 853770945 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.3.25 - 5.3.27, 5.4.15 - 5.4.17
Now: 1453300546 Then: 822148546 1484922946 853770946 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000
Output for 5.3.22 - 5.3.24, 5.4.12 - 5.4.14
Now: 1453300547 Then: 822148547 1484922947 853770947 Dif 1: 631152000 Dif 2: 631152000 Simple: 630720000