3v4l.org

run code in 300+ PHP versions simultaneously
<?php function calcDays($startdate, $enddate) { $first = $startdate < $enddate ? $startdate : $enddate; $second = $startdate < $enddate ? $enddate : $startdate; $inbetween = $second - $first; $i[0] = 60; $i[1] = 24; $month = -20; $days = floor($inbetween / 60 / 60 / 24); $hours = floor($inbetween / 60 / 60 % $i[1]); $minutes = floor($inbetween / 60 % $i[0]); $seconds = $inbetween % $i[0]; return $days . " " . $hours . " " . $minutes . " " . $seconds . " " . $inbetween; } echo calcDays(1388389166, 1391067556);

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.0110.00418.43
8.3.50.0100.01321.08
8.3.40.0090.00618.84
8.3.30.0070.00720.43
8.3.20.0040.00420.47
8.3.10.0050.00321.18
8.3.00.0030.00522.65
8.2.180.0070.00716.88
8.2.170.0140.00022.96
8.2.160.0070.00722.10
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0070.00026.16
8.2.120.0040.00420.79
8.2.110.0090.00019.25
8.2.100.0040.00818.03
8.2.90.0000.00919.15
8.2.80.0060.00318.05
8.2.70.0000.00817.62
8.2.60.0030.00617.93
8.2.50.0040.00418.07
8.2.40.0050.00318.28
8.2.30.0000.00719.55
8.2.20.0000.00817.70
8.2.10.0050.00317.81
8.2.00.0000.00917.80
8.1.280.0030.01225.92
8.1.270.0040.00423.99
8.1.260.0060.00326.35
8.1.250.0000.00828.09
8.1.240.0040.00423.98
8.1.230.0090.00320.89
8.1.220.0040.00418.77
8.1.210.0030.00619.16
8.1.200.0050.00517.48
8.1.190.0000.00817.53
8.1.180.0040.00418.10
8.1.170.0000.00818.78
8.1.160.0050.00218.89
8.1.150.0040.00418.68
8.1.140.0070.00017.50
8.1.130.0070.00017.98
8.1.120.0030.00617.54
8.1.110.0070.00017.42
8.1.100.0000.00817.34
8.1.90.0000.00717.53
8.1.80.0000.00717.51
8.1.70.0030.00317.41
8.1.60.0080.00017.59
8.1.50.0040.00417.58
8.1.40.0040.00417.48
8.1.30.0040.00417.52
8.1.20.0050.00317.70
8.1.10.0000.00717.68
8.1.00.0000.00817.41
8.0.300.0040.00420.02
8.0.290.0000.00717.18
8.0.280.0030.00318.53
8.0.270.0000.00717.18
8.0.260.0000.00616.75
8.0.250.0030.00317.02
8.0.240.0080.00017.02
8.0.230.0050.00317.04
8.0.220.0000.00816.91
8.0.210.0000.00716.96
8.0.200.0070.00017.05
8.0.190.0040.00416.99
8.0.180.0070.00017.03
8.0.170.0000.00816.96
8.0.160.0000.00716.97
8.0.150.0080.00016.75
8.0.140.0000.00716.97
8.0.130.0030.00313.43
8.0.120.0080.00016.82
8.0.110.0040.00416.88
8.0.100.0020.00516.83
8.0.90.0020.00516.82
8.0.80.0130.00316.94
8.0.70.0070.00016.85
8.0.60.0030.00616.84
8.0.50.0000.00816.94
8.0.30.0080.01317.13
8.0.20.0100.00917.40
8.0.10.0070.00017.04
8.0.00.0070.01016.77
7.4.330.0060.00016.84
7.4.320.0040.00416.57
7.4.300.0020.00516.55
7.4.290.0030.00316.67
7.4.280.0000.00716.61
7.4.270.0080.00016.61
7.4.260.0040.00413.35
7.4.250.0000.00716.53
7.4.240.0060.00116.55
7.4.230.0040.00416.64
7.4.220.0130.00616.48
7.4.210.0050.01216.58
7.4.200.0000.00716.46
7.4.190.0070.00016.71
7.4.160.0000.01816.67
7.4.150.0040.01417.40
7.4.140.0120.00617.86
7.4.130.0100.00916.54
7.4.120.0070.01016.52
7.4.110.0100.00716.48
7.4.100.0120.00616.61
7.4.90.0080.01516.44
7.4.80.0070.01019.39
7.4.70.0110.00516.45
7.4.60.0050.01016.49
7.4.50.0080.00016.49
7.4.40.0070.01122.77
7.4.30.0060.00916.62
7.4.00.0050.00914.98
7.3.330.0050.00013.43
7.3.320.0020.00213.41
7.3.310.0000.00716.55
7.3.300.0040.00416.41
7.3.290.0150.00016.42
7.3.280.0100.00416.42
7.3.270.0100.00717.40
7.3.260.0120.00918.24
7.3.250.0030.01416.40
7.3.240.0080.00816.43
7.3.230.0130.00316.50
7.3.210.0030.01516.41
7.3.200.0040.01519.39
7.3.190.0080.01616.38
7.3.180.0120.00416.63
7.3.170.0000.02016.51
7.3.160.0140.00716.49
7.3.120.0060.01014.84
7.3.110.0070.01114.73
7.3.100.0100.00314.89
7.3.90.0030.00614.57
7.3.80.0030.01314.60
7.3.70.0000.01014.90
7.3.60.0040.01214.82
7.3.50.0130.00314.91
7.3.40.0000.01314.86
7.3.30.0040.00814.67
7.3.20.0100.00716.52
7.3.10.0120.00316.71
7.3.00.0030.01316.58
7.2.330.0060.01916.71
7.2.320.0040.01616.65
7.2.310.0090.00917.01
7.2.300.0030.01516.54
7.2.290.0100.00716.58
7.2.250.0140.00314.98
7.2.240.0060.01115.17
7.2.230.0140.00315.25
7.2.220.0040.01114.98
7.2.210.0030.01015.40
7.2.200.0060.00614.80
7.2.190.0030.01415.05
7.2.180.0040.01415.14
7.2.170.0030.00915.01
7.2.00.0090.00019.05
7.1.330.0060.01015.75
7.1.320.0060.00915.86
7.1.310.0070.01016.05
7.1.300.0100.00315.82
7.1.290.0030.00715.96
7.1.280.0030.00715.59
7.1.270.0090.00615.85
7.1.260.0000.01615.83
7.1.200.0000.00915.33
7.1.100.0040.01218.38
7.1.70.0000.00717.18
7.1.60.0100.01019.17
7.1.50.0070.00717.02
7.1.00.0030.06722.35
7.0.200.0000.00716.77
7.0.140.0100.07022.00
7.0.100.0130.08019.91
7.0.90.0000.08720.18
7.0.80.0330.08019.91
7.0.70.0370.06020.05
7.0.60.0300.05020.02
7.0.50.0230.07020.37
7.0.40.0170.07320.13
7.0.30.0100.07320.07
7.0.20.0070.08020.11
7.0.10.0030.08320.07
7.0.00.0100.08020.09
5.6.280.0000.07020.86
5.6.250.0070.08320.48
5.6.240.0100.07720.76
5.6.230.0170.07720.69
5.6.220.0130.07020.49
5.6.210.0230.07020.65
5.6.200.0130.06721.00
5.6.190.0030.07021.03
5.6.180.0030.06020.95
5.6.170.0070.05020.94
5.6.160.0070.06321.01
5.6.150.0030.06021.04
5.6.140.0100.04721.09
5.6.130.0070.08021.11
5.6.120.0100.08321.06
5.6.110.0070.08021.13
5.6.100.0070.06721.03
5.6.90.0100.07720.94
5.6.80.0130.07320.41
5.6.70.0070.07720.34
5.6.60.0100.07320.45
5.6.50.0030.07720.55
5.6.40.0130.07020.47
5.6.30.0100.07720.31
5.6.20.0070.06320.44
5.6.10.0170.06320.29
5.6.00.0100.04720.48
5.5.380.0200.06020.40
5.5.370.0070.07720.57
5.5.360.0030.08720.41
5.5.350.0030.08720.43
5.5.340.0170.07020.93
5.5.330.0070.08320.92
5.5.320.0030.06320.76
5.5.310.0070.08720.80
5.5.300.0030.08720.76
5.5.290.0100.08320.73
5.5.280.0030.08720.87
5.5.270.0070.08320.82
5.5.260.0070.08320.88
5.5.250.0100.07720.73
5.5.240.0070.07320.02
5.5.230.0030.09020.31
5.5.220.0030.07320.14
5.5.210.0000.05320.13
5.5.200.0030.08020.13
5.5.190.0070.08020.14
5.5.180.0100.07720.23
5.5.160.0130.07720.13
5.5.150.0100.08020.21
5.5.140.0030.07320.18
5.5.130.0130.07320.21
5.5.120.0030.06720.13
5.5.110.0130.07720.18
5.5.100.0130.07020.07
5.5.90.0070.07020.13
5.5.80.0030.06720.07
5.5.70.0030.08320.11
5.5.60.0070.08720.15
5.5.50.0070.07020.15
5.5.40.0030.07320.10
5.5.30.0130.07020.06
5.5.20.0030.08320.02
5.5.10.0100.07020.11
5.5.00.0100.06320.11
5.4.450.0170.07019.54
5.4.440.0130.06719.51
5.4.430.0130.07319.55
5.4.420.0100.07019.41
5.4.410.0070.04719.07
5.4.400.0070.06719.03
5.4.390.0100.07719.14
5.4.380.0030.07718.90
5.4.370.0070.07019.07
5.4.360.0100.07018.95
5.4.350.0070.06719.09
5.4.340.0100.06719.23
5.4.320.0100.07019.13
5.4.310.0030.07718.95
5.4.300.0100.07318.94
5.4.290.0030.08019.21
5.4.280.0030.08019.09
5.4.270.0170.06319.20
5.4.260.0070.06719.23
5.4.250.0000.06018.87
5.4.240.0130.06318.94
5.4.230.0070.08019.17
5.4.220.0070.08719.13
5.4.210.0070.04319.11
5.4.200.0200.06019.13
5.4.190.0070.07019.20
5.4.180.0100.07319.08
5.4.170.0100.07019.08
5.4.160.0030.06719.03
5.4.150.0100.07019.14
5.4.140.0030.08316.20
5.4.130.0130.04716.33
5.4.120.0030.06316.41
5.4.110.0000.07716.47
5.4.100.0100.07316.34
5.4.90.0070.06316.48
5.4.80.0030.07016.37
5.4.70.0030.07716.38
5.4.60.0130.07016.38
5.4.50.0170.05716.32
5.4.40.0170.06716.42
5.4.30.0070.07016.39
5.4.20.0070.07016.40
5.4.10.0170.06316.32
5.4.00.0130.06015.78
5.3.290.0070.06714.75
5.3.280.0070.08014.54
5.3.270.0170.07314.71
5.3.260.0030.08314.67
5.3.250.0130.07014.57
5.3.240.0100.07714.70
5.3.230.0030.07714.67
5.3.220.0100.07014.70
5.3.210.0070.08014.68
5.3.200.0130.07714.59
5.3.190.0070.05014.68
5.3.180.0030.08014.62
5.3.170.0030.07314.55
5.3.160.0070.07014.54
5.3.150.0030.05014.70
5.3.140.0130.06314.48
5.3.130.0130.07014.68
5.3.120.0130.06314.52
5.3.110.0000.08314.68
5.3.100.0100.07714.10
5.3.90.0130.05314.01
5.3.80.0070.07713.99
5.3.70.0100.07313.92
5.3.60.0000.08314.06
5.3.50.0030.05014.00
5.3.40.0030.05713.84
5.3.30.0030.06013.92
5.3.20.0070.07313.82
5.3.10.0030.05713.77
5.3.00.0100.06313.66
5.2.170.0030.05712.62
5.2.160.0030.06712.62
5.2.150.0000.07012.62
5.2.140.0030.06312.62
5.2.130.0030.06012.62
5.2.120.0070.06012.62
5.2.110.0030.06012.62
5.2.100.0070.03012.62
5.2.90.0000.06712.62
5.2.80.0100.03012.62
5.2.70.0100.05012.62
5.2.60.0070.05712.62
5.2.50.0070.06312.62
5.2.40.0070.03012.62
5.2.30.0070.02712.62
5.2.20.0130.01712.62
5.2.10.0030.06312.62
5.2.00.0070.05712.62
5.1.60.0030.05312.62
5.1.50.0030.05312.62
5.1.40.0000.06012.62
5.1.30.0070.05012.62
5.1.20.0070.05012.62
5.1.10.0130.04712.62
5.1.00.0100.02712.62
5.0.50.0030.04712.62
5.0.40.0030.02012.62
5.0.30.0070.05012.62
5.0.20.0000.04712.62
5.0.10.0000.04312.62
5.0.00.0000.06312.62
4.4.90.0000.04012.62
4.4.80.0070.03012.62
4.4.70.0030.01712.62
4.4.60.0000.03712.62
4.4.50.0030.03312.62
4.4.40.0030.03312.62
4.4.30.0100.02712.62
4.4.20.0000.02312.62
4.4.10.0000.03012.62
4.4.00.0030.04012.62
4.3.110.0000.03012.62
4.3.100.0030.03312.62
4.3.90.0030.03712.62
4.3.80.0030.03012.62
4.3.70.0100.03012.62
4.3.60.0030.03012.62
4.3.50.0030.03312.62
4.3.40.0030.04312.62
4.3.30.0000.03712.62
4.3.20.0030.02712.62
4.3.10.0000.01712.62
4.3.00.0000.01712.62

preferences:
37.48 ms | 401 KiB | 5 Q