3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo $now = strtotime("now"), "\n"; echo $then = strtotime("now -20 years"), "\n"; echo $now2 = strtotime("now +1 year"), "\n"; echo $then2 = strtotime("now -19 years"), "\n"; echo $now-$then, "\n"; echo $now2-$then2, "\n";
Output for 5.6.28, 7.0.20 - 7.2.0
1453300381 822148381 1484922781 853770781 631152000 631152000
Output for 7.0.6
1463832313 832680313 1495368313 864216313 631152000 631152000
Output for 7.0.5
1459670371 828518371 1491206371 860054371 631152000 631152000
Output for 7.0.4
1457644054 826492054 1489180054 858028054 631152000 631152000
Output for 7.0.3
1458340962 827188962 1489876962 858724962 631152000 631152000
Output for 7.0.2
1458708610 827556610 1490244610 859092610 631152000 631152000
Output for 7.0.1
1458805926 827653926 1490341926 859189926 631152000 631152000
Output for 7.0.0
1459068301 827919901 1490604301 859455901 631148400 631148400
Output for 5.6.21
1462200869 831048869 1493736869 862584869 631152000 631152000
Output for 5.6.20
1460271719 829119719 1491807719 860655719 631152000 631152000
Output for 5.6.19
1457414253 826262253 1488950253 857798253 631152000 631152000
Output for 5.6.18
1458051411 826899411 1489587411 858435411 631152000 631152000
Output for 5.6.17
1458438543 827286543 1489974543 858822543 631152000 631152000
Output for 5.6.16
1459157685 828009285 1490693685 859545285 631148400 631148400
Output for 5.6.15
1459247078 828098678 1490783078 859634678 631148400 631148400
Output for 5.6.14
1460650031 829498031 1492186031 861034031 631152000 631152000
Output for 5.6.13
1460738780 829586780 1492274780 861122780 631152000 631152000
Output for 5.6.12
1461136615 829984615 1492672615 861520615 631152000 631152000
Output for 5.6.11
1461505355 830353355 1493041355 861889355 631152000 631152000
Output for 5.6.10
1461599304 830447304 1493135304 861983304 631152000 631152000
Output for 5.6.9
1461791793 830639793 1493327793 862175793 631152000 631152000
Output for 5.6.8
1461994946 830842946 1493530946 862378946 631152000 631152000
Output for 5.5.35
1463965216 832813216 1495501216 864349216 631152000 631152000
Output for 5.5.34
1460366209 829214209 1491902209 860750209 631152000 631152000
Output for 5.5.33
1457511768 826359768 1489047768 857895768 631152000 631152000
Output for 5.5.32
1458238566 827086566 1489774566 858622566 631152000 631152000
Output for 5.5.31
1458536587 827384587 1490072587 858920587 631152000 631152000
Output for 5.5.30
1459512943 828360943 1491048943 859896943 631152000 631152000
Output for 5.5.29
1460876630 829724630 1492412630 861260630 631152000 631152000
Output for 5.5.28
1461234979 830082979 1492770979 861618979 631152000 631152000
Output for 5.5.27
1461327202 830175202 1492863202 861711202 631152000 631152000
Output for 5.5.26
1461695399 830543399 1493231399 862079399 631152000 631152000
Output for 5.5.25
1461895015 830743015 1493431015 862279015 631152000 631152000
Output for 5.5.24
1464078512 832926512 1495614512 864462512 631152000 631152000
Output for 5.4.45
1453300384 822148384 1484922784 853770784 631152000 631152000
Output for 5.4.44
1453300385 822148385 1484922785 853770785 631152000 631152000
Output for 5.4.41 - 5.4.43
1453300386 822148386 1484922786 853770786 631152000 631152000
Output for 5.4.40
1453300387 822148387 1484922787 853770787 631152000 631152000
Output for 5.4.38 - 5.4.39
1453300388 822148388 1484922788 853770788 631152000 631152000
Output for 5.4.36 - 5.4.37
1453300389 822148389 1484922789 853770789 631152000 631152000
Output for 5.4.34 - 5.4.35
1453300390 822148390 1484922790 853770790 631152000 631152000
Output for 5.3.29, 5.4.30 - 5.4.32
1453300391 822148391 1484922791 853770791 631152000 631152000
Output for 5.4.26 - 5.4.29
1453300392 822148392 1484922792 853770792 631152000 631152000
Output for 5.3.28, 5.4.23 - 5.4.25
1453300393 822148393 1484922793 853770793 631152000 631152000
Output for 5.4.20 - 5.4.22
1453300394 822148394 1484922794 853770794 631152000 631152000
Output for 5.3.27, 5.4.17 - 5.4.19
1453300395 822148395 1484922795 853770795 631152000 631152000
Output for 5.3.24 - 5.3.26, 5.4.13 - 5.4.16
1453300396 822148396 1484922796 853770796 631152000 631152000
Output for 5.3.22 - 5.3.23, 5.4.12
1453300397 822148397 1484922797 853770797 631152000 631152000