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";
based on eJFsA
Output for 5.6.28, 7.0.20 - 7.2.0
Now: 1453300475 Then: 822148475 1484922875 853770875 Dif 1: 631152000 Dif 2: 631152000
Output for 7.0.6
Now: 1463832314 Then: 832680314 1495368314 864216314 Dif 1: 631152000 Dif 2: 631152000
Output for 7.0.5
Now: 1459670372 Then: 828518372 1491206372 860054372 Dif 1: 631152000 Dif 2: 631152000
Output for 7.0.4
Now: 1457644055 Then: 826492055 1489180055 858028055 Dif 1: 631152000 Dif 2: 631152000
Output for 7.0.3
Now: 1458340963 Then: 827188963 1489876963 858724963 Dif 1: 631152000 Dif 2: 631152000
Output for 7.0.2
Now: 1458708611 Then: 827556611 1490244611 859092611 Dif 1: 631152000 Dif 2: 631152000
Output for 7.0.1
Now: 1458805927 Then: 827653927 1490341927 859189927 Dif 1: 631152000 Dif 2: 631152000
Output for 7.0.0
Now: 1459068302 Then: 827919902 1490604302 859455902 Dif 1: 631148400 Dif 2: 631148400
Output for 5.6.21
Now: 1462200870 Then: 831048870 1493736870 862584870 Dif 1: 631152000 Dif 2: 631152000
Output for 5.6.20
Now: 1460271720 Then: 829119720 1491807720 860655720 Dif 1: 631152000 Dif 2: 631152000
Output for 5.6.19
Now: 1457414254 Then: 826262254 1488950254 857798254 Dif 1: 631152000 Dif 2: 631152000
Output for 5.6.18
Now: 1458051412 Then: 826899412 1489587412 858435412 Dif 1: 631152000 Dif 2: 631152000
Output for 5.6.17
Now: 1458438544 Then: 827286544 1489974544 858822544 Dif 1: 631152000 Dif 2: 631152000
Output for 5.6.16
Now: 1459157686 Then: 828009286 1490693686 859545286 Dif 1: 631148400 Dif 2: 631148400
Output for 5.6.15
Now: 1459247079 Then: 828098679 1490783079 859634679 Dif 1: 631148400 Dif 2: 631148400
Output for 5.6.14
Now: 1460650032 Then: 829498032 1492186032 861034032 Dif 1: 631152000 Dif 2: 631152000
Output for 5.6.13
Now: 1460738781 Then: 829586781 1492274781 861122781 Dif 1: 631152000 Dif 2: 631152000
Output for 5.6.12
Now: 1461136616 Then: 829984616 1492672616 861520616 Dif 1: 631152000 Dif 2: 631152000
Output for 5.6.11
Now: 1461505356 Then: 830353356 1493041356 861889356 Dif 1: 631152000 Dif 2: 631152000
Output for 5.6.10
Now: 1461599305 Then: 830447305 1493135305 861983305 Dif 1: 631152000 Dif 2: 631152000
Output for 5.6.9
Now: 1461791794 Then: 830639794 1493327794 862175794 Dif 1: 631152000 Dif 2: 631152000
Output for 5.6.8
Now: 1461994947 Then: 830842947 1493530947 862378947 Dif 1: 631152000 Dif 2: 631152000
Output for 5.5.35
Now: 1463965217 Then: 832813217 1495501217 864349217 Dif 1: 631152000 Dif 2: 631152000
Output for 5.5.34
Now: 1460366211 Then: 829214211 1491902211 860750211 Dif 1: 631152000 Dif 2: 631152000
Output for 5.5.33
Now: 1457511769 Then: 826359769 1489047769 857895769 Dif 1: 631152000 Dif 2: 631152000
Output for 5.5.32
Now: 1458238567 Then: 827086567 1489774567 858622567 Dif 1: 631152000 Dif 2: 631152000
Output for 5.5.31
Now: 1458536588 Then: 827384588 1490072588 858920588 Dif 1: 631152000 Dif 2: 631152000
Output for 5.5.30
Now: 1459512944 Then: 828360944 1491048944 859896944 Dif 1: 631152000 Dif 2: 631152000
Output for 5.5.29
Now: 1460876631 Then: 829724631 1492412631 861260631 Dif 1: 631152000 Dif 2: 631152000
Output for 5.5.28
Now: 1461234980 Then: 830082980 1492770980 861618980 Dif 1: 631152000 Dif 2: 631152000
Output for 5.5.27
Now: 1461327203 Then: 830175203 1492863203 861711203 Dif 1: 631152000 Dif 2: 631152000
Output for 5.5.26
Now: 1461695400 Then: 830543400 1493231400 862079400 Dif 1: 631152000 Dif 2: 631152000
Output for 5.5.25
Now: 1461895016 Then: 830743016 1493431016 862279016 Dif 1: 631152000 Dif 2: 631152000
Output for 5.5.24
Now: 1464078513 Then: 832926513 1495614513 864462513 Dif 1: 631152000 Dif 2: 631152000
Output for 5.4.44 - 5.4.45
Now: 1453300477 Then: 822148477 1484922877 853770877 Dif 1: 631152000 Dif 2: 631152000
Output for 5.4.40 - 5.4.43
Now: 1453300478 Then: 822148478 1484922878 853770878 Dif 1: 631152000 Dif 2: 631152000
Output for 5.4.37 - 5.4.39
Now: 1453300479 Then: 822148479 1484922879 853770879 Dif 1: 631152000 Dif 2: 631152000
Output for 5.4.34 - 5.4.36
Now: 1453300480 Then: 822148480 1484922880 853770880 Dif 1: 631152000 Dif 2: 631152000
Output for 5.3.29, 5.4.28 - 5.4.32
Now: 1453300481 Then: 822148481 1484922881 853770881 Dif 1: 631152000 Dif 2: 631152000
Output for 5.3.28, 5.4.22 - 5.4.27
Now: 1453300482 Then: 822148482 1484922882 853770882 Dif 1: 631152000 Dif 2: 631152000
Output for 5.3.27, 5.4.17 - 5.4.21
Now: 1453300483 Then: 822148483 1484922883 853770883 Dif 1: 631152000 Dif 2: 631152000
Output for 5.3.22 - 5.3.26, 5.4.12 - 5.4.16
Now: 1453300484 Then: 822148484 1484922884 853770884 Dif 1: 631152000 Dif 2: 631152000