3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sdate = "1981-11-04"; $edate = "2013-09-04"; $date_diff = abs(strtotime($edate) - strtotime($sdate)); $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.01418.55
8.3.50.0100.00822.09
8.3.40.0120.00318.92
8.3.30.0110.00319.09
8.3.20.0080.00020.46
8.3.10.0080.00020.51
8.3.00.0040.00419.69
8.2.180.0070.01416.75
8.2.170.0150.00022.96
8.2.160.0070.00719.19
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00022.30
8.2.110.0070.00319.44
8.2.100.0150.00018.03
8.2.90.0040.00419.17
8.2.80.0040.00417.97
8.2.70.0000.01017.88
8.2.60.0030.00517.80
8.2.50.0040.00418.10
8.2.40.0040.00818.28
8.2.30.0030.00619.31
8.2.20.0040.00417.86
8.2.10.0000.00818.12
8.2.00.0050.00317.86
8.1.280.0150.00325.92
8.1.270.0040.00422.10
8.1.260.0000.00826.35
8.1.250.0000.00828.09
8.1.240.0040.00423.98
8.1.230.0070.00417.82
8.1.220.0000.00817.88
8.1.210.0050.00318.77
8.1.200.0030.00617.38
8.1.190.0040.00417.35
8.1.180.0060.00318.10
8.1.170.0030.00518.77
8.1.160.0030.00322.02
8.1.150.0040.00419.05
8.1.140.0060.00317.62
8.1.130.0000.00717.98
8.1.120.0040.00417.59
8.1.110.0000.00717.66
8.1.100.0050.00217.54
8.1.90.0050.00217.66
8.1.80.0000.00717.65
8.1.70.0080.00017.50
8.1.60.0030.00617.60
8.1.50.0060.00317.54
8.1.40.0000.00817.66
8.1.30.0000.00817.82
8.1.20.0000.00717.68
8.1.10.0040.00417.76
8.1.00.0000.00917.62
8.0.300.0040.00418.77
8.0.290.0000.00716.88
8.0.280.0000.00718.58
8.0.270.0030.00517.37
8.0.260.0030.00318.59
8.0.250.0000.00717.11
8.0.240.0060.00017.23
8.0.230.0000.00717.10
8.0.220.0030.00317.07
8.0.210.0030.00317.20
8.0.200.0040.00417.23
8.0.190.0110.00017.11
8.0.180.0040.00417.11
8.0.170.0070.00017.02
8.0.160.0040.00417.09
8.0.150.0040.00317.06
8.0.140.0000.00717.06
8.0.130.0060.00013.40
8.0.120.0050.00216.89
8.0.110.0040.00417.13
8.0.100.0040.00416.95
8.0.90.0040.00416.98
8.0.80.0040.01816.97
8.0.70.0040.00417.07
8.0.60.0060.00317.08
8.0.50.0040.00417.04
8.0.30.0090.00917.10
8.0.20.0080.01417.40
8.0.10.0050.00317.09
8.0.00.0110.00717.07
7.4.330.0020.00215.13
7.4.320.0050.00316.65
7.4.300.0060.00016.71
7.4.290.0030.00316.73
7.4.280.0040.00416.79
7.4.270.0040.00416.63
7.4.260.0000.00616.67
7.4.250.0000.00716.73
7.4.240.0050.00216.64
7.4.230.0030.00316.75
7.4.220.0060.01016.60
7.4.210.0070.00716.72
7.4.200.0000.00816.75
7.4.160.0140.00316.59
7.4.150.0160.00317.40
7.4.140.0110.00617.86
7.4.130.0100.00716.61
7.4.120.0090.01216.71
7.4.110.0070.01016.71
7.4.100.0100.00716.53
7.4.90.0090.00916.70
7.4.80.0030.01616.62
7.4.70.0160.00616.84
7.4.60.0030.01616.70
7.4.50.0000.00816.76
7.4.40.0090.01516.62
7.4.30.0060.01616.73
7.4.00.0150.00015.16
7.3.330.0050.00013.48
7.3.320.0000.00613.25
7.3.310.0000.00716.63
7.3.300.0040.00416.62
7.3.290.0070.01116.52
7.3.280.0080.01016.54
7.3.270.0070.01117.40
7.3.260.0190.00316.64
7.3.250.0080.00916.66
7.3.240.0050.01316.66
7.3.230.0060.01516.72
7.3.210.0100.00716.62
7.3.200.0150.00319.39
7.3.190.0100.00716.74
7.3.180.0070.01016.70
7.3.170.0100.00616.64
7.3.160.0040.01116.54
7.2.330.0100.00716.93
7.2.320.0060.01216.90
7.2.310.0080.00816.75
7.2.300.0120.00916.57
7.2.290.0060.01016.87
7.2.00.0030.01019.29
7.1.100.0060.00618.27
7.1.70.0040.00417.45
7.1.60.0090.00919.32
7.1.50.0030.01017.14
7.1.00.0000.08022.57
7.0.200.0000.00716.98
7.0.140.0070.06721.92
7.0.60.0100.06319.96
7.0.50.0030.04317.68
7.0.40.0070.08720.27
7.0.30.0470.04720.19
7.0.20.0170.04320.30
7.0.10.0070.09020.18
7.0.00.0000.04720.09
5.6.280.0070.07020.78
5.6.210.0030.08720.50
5.6.200.0100.03718.09
5.6.190.0100.03720.27
5.6.180.0430.04020.61
5.6.170.0270.07720.50
5.6.160.0100.05020.50
5.6.150.0100.08018.07
5.6.140.0070.05718.16
5.6.130.0100.08018.11
5.6.120.0030.05020.84
5.6.110.0100.06721.11
5.6.100.0200.07321.02
5.6.90.0070.07321.09
5.6.80.0030.08320.39
5.5.350.0130.03020.38
5.5.340.0100.08018.01
5.5.330.0030.04020.43
5.5.320.0300.05320.32
5.5.310.0230.06020.26
5.5.300.0070.03717.88
5.5.290.0100.08017.90
5.5.280.0000.04320.69
5.5.270.0100.08320.82
5.5.260.0100.07720.79
5.5.250.0030.04320.59
5.5.240.0100.07720.34
5.4.450.0030.06319.33
5.4.440.0870.05319.41
5.4.430.0970.06319.32
5.4.420.0630.06719.62
5.4.410.1030.06319.36
5.4.400.1100.05019.26
5.4.390.1030.04319.15
5.4.380.0500.05318.72
5.4.370.0370.05718.52
5.4.360.0400.07018.70
5.4.350.0300.07718.59
5.4.340.0300.05318.56
5.4.320.0050.03612.45
5.4.310.0080.03712.45
5.4.300.0060.03612.45
5.4.290.0060.03712.45
5.4.280.0050.03612.35
5.4.270.0050.03512.35
5.4.260.0060.03712.35
5.4.250.0060.03712.35
5.4.240.0050.04412.35
5.4.230.0070.03512.34
5.4.220.0030.03912.34
5.4.210.0050.04012.34
5.4.200.0100.03912.34
5.4.190.0120.03012.34
5.4.180.0070.03512.34
5.4.170.0080.03412.35
5.4.160.0070.03512.34
5.4.150.0030.03912.34
5.4.140.0050.03812.02
5.4.130.0080.03312.02
5.4.120.0070.03411.97
5.4.110.0090.03211.97
5.4.100.0050.03611.96
5.4.90.0060.03711.96
5.4.80.0070.03611.96
5.4.70.0120.03811.96
5.4.60.0100.04111.96
5.4.50.0070.03511.96
5.4.40.0060.04211.95
5.4.30.0070.03611.95
5.4.20.0040.03811.95
5.4.10.0020.03811.95
5.4.00.0040.03911.43
5.3.290.0080.03812.80
5.3.280.0080.04212.71
5.3.270.0060.03912.72
5.3.260.0020.04212.72
5.3.250.0090.04112.71
5.3.240.0060.03712.72
5.3.230.0070.03612.71
5.3.220.0050.04512.68
5.3.210.0070.03712.68
5.3.200.0080.03512.68
5.3.190.0070.03512.68
5.3.180.0060.03912.67
5.3.170.0080.03212.66
5.3.160.0080.03312.68
5.3.150.0050.03712.67
5.3.140.0050.03612.66
5.3.130.0050.03912.66
5.3.120.0040.04012.66
5.3.110.0070.03612.66
5.3.100.0060.03612.12
5.3.90.0060.04112.08
5.3.80.0050.04312.08
5.3.70.0100.03412.07
5.3.60.0070.03512.06
5.3.50.0060.03512.00
5.3.40.0110.03112.00
5.3.30.0070.03611.95
5.3.20.0050.03611.72
5.3.10.0070.03411.69
5.3.00.0060.03511.68
5.2.170.0030.0319.18
5.2.160.0020.0319.18
5.2.150.0040.0319.18
5.2.140.0070.0289.18
5.2.130.0090.0249.14
5.2.120.0050.0319.14
5.2.110.0050.0289.14
5.2.100.0050.0289.14
5.2.90.0060.0349.14
5.2.80.0040.0389.14
5.2.70.0090.0259.13
5.2.60.0040.0299.09
5.2.50.0040.0299.06
5.2.40.0050.0279.04
5.2.30.0080.0259.01
5.2.20.0040.0289.00
5.2.10.0040.0288.93
5.2.00.0050.0288.78
5.1.60.0010.0268.07
5.1.50.0030.0258.07
5.1.40.0020.0268.04
5.1.30.0050.0288.39
5.1.20.0030.0278.42
5.1.10.0050.0248.14
5.1.00.0070.0228.14
5.0.50.0060.0176.63
5.0.40.0030.0196.49
5.0.30.0030.0386.30
5.0.20.0030.0196.28
5.0.10.0040.0186.25
5.0.00.0040.0296.24
4.4.90.0060.0124.78
4.4.80.0030.0154.75
4.4.70.0020.0164.75
4.4.60.0040.0194.75
4.4.50.0040.0204.77
4.4.40.0030.0244.71
4.4.30.0020.0164.76
4.4.20.0040.0144.85
4.4.10.0020.0164.85
4.4.00.0030.0244.75
4.3.110.0020.0174.66
4.3.100.0030.0144.66
4.3.90.0030.0134.64
4.3.80.0020.0254.58
4.3.70.0010.0164.63
4.3.60.0030.0144.63
4.3.50.0020.0164.63
4.3.40.0030.0234.54
4.3.30.0020.0153.30
4.3.20.0010.0173.28
4.3.10.0030.0143.24
4.3.00.0100.0276.73

preferences:
46.66 ms | 401 KiB | 5 Q