3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sdate = "1981-11-04"; $edate = "2013-09-04"; $t=strtotime($edate); print "$t"; /*$date_diff = abs(strtotime($edate) - strtotime($sdate)); print "$date_diff"; $years = floor($date_diff / (365*60*60*24)); $months = floor(($date_diff - $years * 365*60*60*24) / (30*60*60*24)); $days = floor(($date_diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24)); printf("%d years, %d months, %d days", $years, $months, $days);*/ ?> - See more at: http://www.w3resource.com/php-exercises/php-date-exercises.php#sthash.xJA52BEw.dpuf

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0070.01118.38
8.3.50.0120.01022.13
8.3.40.0040.01218.64
8.3.30.0070.00719.07
8.3.20.0000.00820.13
8.3.10.0090.00020.78
8.3.00.0090.00019.68
8.2.180.0180.00416.50
8.2.170.0140.00022.96
8.2.160.0000.01519.07
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00422.17
8.2.110.0030.00620.32
8.2.100.0030.00718.22
8.2.90.0040.00419.35
8.2.80.0040.00417.97
8.2.70.0030.00517.63
8.2.60.0050.00318.04
8.2.50.0000.00818.07
8.2.40.0030.00618.34
8.2.30.0030.00519.30
8.2.20.0000.00817.91
8.2.10.0030.00518.14
8.2.00.0000.00817.74
8.1.280.0140.00425.92
8.1.270.0080.00022.18
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.85
8.1.230.0000.01218.86
8.1.220.0050.00217.88
8.1.210.0000.00818.77
8.1.200.0050.00717.36
8.1.190.0060.00317.35
8.1.180.0090.00018.10
8.1.170.0040.00418.59
8.1.160.0000.00721.94
8.1.150.0040.00418.93
8.1.140.0030.00517.44
8.1.130.0000.00717.79
8.1.120.0040.00417.59
8.1.110.0030.00317.54
8.1.100.0000.00717.60
8.1.90.0030.00317.56
8.1.80.0050.00217.64
8.1.70.0030.00617.46
8.1.60.0040.00417.72
8.1.50.0040.00417.65
8.1.40.0020.00517.57
8.1.30.0030.00617.67
8.1.20.0050.00317.66
8.1.10.0040.00417.53
8.1.00.0030.00617.59
8.0.300.0050.00318.77
8.0.290.0050.00216.88
8.0.280.0030.00318.50
8.0.270.0040.00417.23
8.0.260.0000.00717.31
8.0.250.0000.00617.17
8.0.240.0000.00617.11
8.0.230.0000.00717.06
8.0.220.0030.00317.01
8.0.210.0030.00316.99
8.0.200.0050.00317.07
8.0.190.0050.00317.14
8.0.180.0030.00317.02
8.0.170.0040.00417.08
8.0.160.0000.00716.84
8.0.150.0070.00017.00
8.0.140.0000.00816.99
8.0.130.0060.00013.36
8.0.120.0060.00316.87
8.0.110.0070.00016.99
8.0.100.0000.00716.89
8.0.90.0000.00716.95
8.0.80.0100.00716.96
8.0.70.0040.00417.02
8.0.60.0040.00417.06
8.0.50.0040.00417.08
8.0.30.0090.01017.12
8.0.20.0140.00517.40
8.0.10.0050.00317.20
8.0.00.0140.00716.96
7.4.330.0000.00515.15
7.4.320.0000.00616.63
7.4.300.0060.00016.53
7.4.290.0030.00316.70
7.4.280.0000.00816.72
7.4.270.0040.00416.71
7.4.260.0000.00716.71
7.4.250.0000.00716.64
7.4.240.0020.00616.73
7.4.230.0000.00716.38
7.4.220.0070.01016.50
7.4.210.0110.00416.67
7.4.200.0070.00016.38
7.4.160.0110.00616.55
7.4.150.0080.01117.40
7.4.140.0080.01017.86
7.4.130.0130.00316.68
7.4.120.0100.01116.55
7.4.110.0130.01016.83
7.4.100.0100.00716.77
7.4.90.0030.01416.56
7.4.80.0000.01716.79
7.4.70.0130.01016.77
7.4.60.0060.01216.58
7.4.50.0050.00316.71
7.4.40.0130.00316.76
7.4.30.0090.00716.62
7.4.00.0080.00415.29
7.3.330.0000.00513.30
7.3.320.0050.00013.16
7.3.310.0000.00716.26
7.3.300.0030.00316.32
7.3.290.0000.01416.38
7.3.280.0040.01116.32
7.3.270.0070.01817.40
7.3.260.0080.01216.60
7.3.250.0100.00716.43
7.3.240.0100.00716.50
7.3.230.0060.01116.59
7.3.210.0070.01016.56
7.3.200.0120.00719.39
7.3.190.0110.01116.55
7.3.180.0040.01216.29
7.3.170.0060.00916.57
7.3.160.0060.00916.46
7.3.10.0060.00316.54
7.3.00.0150.00616.48
7.2.330.0040.01316.59
7.2.320.0080.00816.85
7.2.310.0030.01316.88
7.2.300.0090.00816.80
7.2.290.0110.00916.85
7.2.130.0070.00316.73
7.2.120.0120.00316.72
7.2.110.0070.01017.09
7.2.100.0000.01216.94
7.2.90.0140.00016.93
7.2.80.0120.00316.72
7.2.70.0120.00316.98
7.2.60.0060.00616.83
7.2.50.0100.00716.72
7.2.40.0190.00317.07
7.2.30.0120.00016.79
7.2.20.0030.00916.74
7.2.10.0060.00916.95
7.2.00.0050.01418.18
7.1.250.0030.01015.70
7.1.240.0030.00615.64
7.1.230.0150.00015.98
7.1.220.0070.00715.91
7.1.210.0000.01016.00
7.1.200.0120.00315.71
7.1.190.0090.00415.98
7.1.180.0040.01015.55
7.1.170.0040.00815.86
7.1.160.0030.01115.72
7.1.150.0100.00315.91
7.1.140.0130.00015.69
7.1.130.0190.00315.71
7.1.120.0070.00715.82
7.1.110.0060.00915.99
7.1.100.0080.00817.08
7.1.90.0040.00915.84
7.1.80.0030.00815.67
7.1.70.0050.00516.54
7.1.60.0070.01317.57
7.1.50.0140.00716.38
7.1.40.0080.01215.82
7.1.30.0170.00315.74
7.1.20.0060.00615.63
7.1.10.0080.00815.59
7.1.00.0080.04319.06
7.0.330.0030.00915.27
7.0.320.0150.00815.59
7.0.310.0040.00715.38
7.0.300.0040.00715.44
7.0.290.0040.01615.15
7.0.280.0190.00415.29
7.0.270.0110.00415.31
7.0.260.0220.00015.00
7.0.250.0000.01315.21
7.0.240.0210.00415.27
7.0.230.0040.00815.23
7.0.220.0090.00615.21
7.0.210.0100.00715.25
7.0.200.0060.00416.36
7.0.190.0080.00615.21
7.0.180.0080.00815.34
7.0.170.0060.00915.38
7.0.160.0090.00615.48
7.0.150.0060.01415.36
7.0.140.0040.04118.74
7.0.130.0370.00715.82
7.0.120.0110.02718.71
7.0.110.0150.03318.77
7.0.100.0120.01818.79
7.0.90.0060.03818.79
7.0.80.0100.02218.74
7.0.70.0050.05018.79
7.0.60.0110.04118.77
7.0.50.0020.05318.88
7.0.40.0060.03116.85
7.0.30.0060.04216.94
7.0.20.0080.03516.78
7.0.10.0060.04616.83
7.0.00.0060.03616.82
5.6.380.0060.00914.41
5.6.370.0140.00714.32
5.6.360.0040.01214.29
5.6.350.0050.01014.18
5.6.340.0120.00814.59
5.6.330.0360.00814.07
5.6.320.0180.00414.32
5.6.310.0310.01014.40
5.6.300.0210.00914.41
5.6.290.0180.01514.61
5.6.280.0090.04217.55
5.6.270.0020.02517.71
5.6.260.0060.02017.70
5.6.250.0070.02417.66
5.6.240.0050.02817.65
5.6.230.0050.02717.76
5.6.220.0080.01817.55
5.6.210.0060.02217.56
5.6.200.0090.02717.52
5.6.190.0100.03217.57
5.6.180.0050.04317.54
5.6.170.0080.04417.46
5.6.160.0160.03017.47
5.6.150.0130.03817.51
5.6.140.0160.04817.50
5.6.130.0130.03317.71
5.6.120.0050.04517.68
5.6.110.0080.02217.59
5.6.100.0070.04517.58
5.6.90.0080.04217.42
5.6.80.0010.02717.35
5.6.70.0230.02817.07
5.6.60.0070.02417.28
5.6.50.0050.02917.19
5.6.40.0080.04717.15
5.6.30.0070.04317.17
5.6.20.0010.04317.41
5.6.10.0100.03017.11
5.6.00.0070.02617.10
5.5.380.0050.02014.23
5.5.370.0080.01914.07
5.5.360.0060.02114.19
5.5.350.0060.03314.17
5.5.340.0090.04514.38
5.5.330.0040.03714.53
5.5.320.0070.04114.54
5.5.310.0080.02814.27
5.5.300.0050.03914.50
5.5.290.0040.02514.35
5.5.280.0070.02514.49
5.5.270.0050.02714.31
5.5.260.0040.02614.55
5.5.250.0000.02414.46
5.5.240.0040.03014.15
5.5.230.0020.02413.96
5.5.220.0080.04014.26
5.5.210.0050.03914.01
5.5.200.0110.02014.08
5.5.190.0060.02014.00
5.5.180.0030.03514.18
5.5.170.0050.00310.85
5.5.160.0060.03114.23
5.5.150.0100.02414.30
5.5.140.0070.03414.11
5.5.130.0040.04213.99
5.5.120.0060.02014.14
5.5.110.0050.04014.24
5.5.100.0080.03613.95
5.5.90.0100.03214.04
5.5.80.0070.04114.12
5.5.70.0060.03514.07
5.5.60.0020.03413.93
5.5.50.0030.02814.04
5.5.40.0040.02013.98
5.5.30.0020.02214.06
5.5.20.0050.02314.11
5.5.10.0080.03514.08
5.5.00.0070.03814.04
5.4.450.0040.03315.04
5.4.440.0060.03614.92
5.4.430.0040.02615.20
5.4.420.0030.02814.98
5.4.410.0010.02514.88
5.4.400.0060.02114.88
5.4.390.0040.03514.86
5.4.380.0070.02314.74
5.4.370.0050.03014.99
5.4.360.0030.02815.05
5.4.350.0040.03214.84
5.4.340.0020.02015.04
5.4.330.0070.00010.93
5.4.320.0060.02315.21
5.4.310.0070.02015.06
5.4.300.0030.04214.97
5.4.290.0080.03314.92
5.4.280.0070.03815.08
5.4.270.0060.03014.91
5.4.260.0040.02914.97
5.4.250.0020.03714.97
5.4.240.0020.04315.22
5.4.230.0050.03414.93
5.4.220.0030.02114.94
5.4.210.0020.02015.12
5.4.200.0000.03414.96
5.4.190.0040.04014.89
5.4.180.0030.02514.87
5.4.170.0020.03614.74
5.4.160.0080.03214.85
5.4.150.0020.04414.83
5.4.140.0050.04113.68
5.4.130.0050.03013.53
5.4.120.0070.03513.61
5.4.110.0030.03113.75
5.4.100.0060.03213.84
5.4.90.0070.03713.84
5.4.80.0100.02613.65
5.4.70.0080.03813.71
5.4.60.0040.03313.75
5.4.50.0070.03613.57
5.4.40.0140.03313.69
5.4.30.0050.03213.58
5.4.20.0070.02813.54
5.4.10.0070.01713.63
5.4.00.0050.04113.39
5.3.290.0040.02012.68
5.3.280.0050.02012.58
5.3.270.0000.04412.62
5.3.260.0020.03712.52
5.3.250.0030.03612.55
5.3.240.0050.03012.64
5.3.230.0070.03812.61
5.3.220.0050.03312.28
5.3.210.0020.04412.41
5.3.200.0020.04312.48
5.3.190.0070.03312.47
5.3.180.0040.01912.49
5.3.170.0040.03912.45
5.3.160.0080.03512.52
5.3.150.0050.04212.46
5.3.140.0110.01812.46
5.3.130.0050.03212.51
5.3.120.0040.03612.50
5.3.110.0020.03012.41
5.3.100.0080.03912.24
5.3.90.0080.03512.29
5.3.80.0050.02212.29
5.3.70.0050.04212.13
5.3.60.0070.01812.19
5.3.50.0060.02312.20
5.3.40.0080.03212.10
5.3.30.0040.03212.07
5.3.20.0020.01712.09
5.3.10.0030.02511.87
5.3.00.0050.02311.93
5.2.170.0090.02910.49
5.2.160.0050.02610.49
5.2.150.0040.02110.46
5.2.140.0030.03010.49
5.2.130.0060.02710.39
5.2.120.0070.02010.47
5.2.110.0040.01510.53
5.2.100.0070.02510.46
5.2.90.0060.02910.45
5.2.80.0080.01510.52
5.2.70.0040.01910.47
5.2.60.0000.02010.47
5.2.50.0060.01610.41
5.2.40.0050.02010.40
5.2.30.0040.02210.41
5.2.20.0030.02810.38
5.2.10.0040.01910.38
5.2.00.0030.01610.37
5.1.60.0020.01310.06
5.1.50.0040.0139.88
5.1.40.0040.0159.96
5.1.30.0050.01310.04
5.1.20.0020.02210.19
5.1.10.0020.01510.06
5.1.00.0010.0169.89
5.0.50.0020.0089.88
5.0.40.0030.0109.88
5.0.30.0020.0349.88
5.0.20.0030.0119.88
5.0.10.0060.0189.88
5.0.00.0070.0129.88
4.4.90.0020.0149.88
4.4.80.0040.0089.88
4.4.70.0010.0119.88
4.4.60.0000.0149.88
4.4.50.0050.0189.88
4.4.40.0020.0139.88
4.4.30.0020.0089.88
4.4.20.0000.0109.88
4.4.10.0050.0089.88
4.4.00.0030.0119.88
4.3.110.0000.0099.88
4.3.100.0030.0139.88
4.3.90.0000.0169.88
4.3.80.0030.0259.88
4.3.70.0010.0089.88
4.3.60.0000.0099.88
4.3.50.0000.0109.88
4.3.40.0000.0249.88
4.3.30.0010.0119.88
4.3.20.0000.0179.88
4.3.10.0000.0189.88
4.3.00.0040.0149.88

preferences:
48.27 ms | 400 KiB | 5 Q