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; $days = floor($inbetween / 60 / 60 / 24); $hours = floor($inbetween / 60 / 60 - $days * 24); $minutes = floor($inbetween / 60 - $hours * 60 - $days * 24); return $days . " " . $hours . " " . $minutes; } echo calcDays(1388385927, 1488390027);

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.0080.00818.31
8.3.50.0080.00818.04
8.3.40.0070.00718.52
8.3.30.0140.00019.06
8.3.20.0050.00320.29
8.3.10.0040.00423.71
8.3.00.0080.00020.74
8.2.180.0090.00918.41
8.2.170.0100.00722.96
8.2.160.0130.00020.52
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0140.00026.16
8.2.120.0080.00019.36
8.2.110.0110.01122.11
8.2.100.0110.00017.91
8.2.90.0060.00319.40
8.2.80.0080.00017.97
8.2.70.0030.00617.75
8.2.60.0080.00317.63
8.2.50.0090.00018.07
8.2.40.0060.00318.28
8.2.30.0030.00518.33
8.2.20.0020.00517.67
8.2.10.0090.00018.09
8.2.00.0030.00617.71
8.1.280.0070.00725.92
8.1.270.0080.00023.80
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0060.00323.97
8.1.230.0100.00019.28
8.1.220.0040.00417.74
8.1.210.0090.00018.77
8.1.200.0100.00017.35
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0060.00618.64
8.1.160.0000.00722.02
8.1.150.0070.00018.72
8.1.140.0000.00717.57
8.1.130.0070.00019.75
8.1.120.0040.00417.55
8.1.110.0000.00717.53
8.1.100.0040.00417.57
8.1.90.0040.00417.50
8.1.80.0030.00417.52
8.1.70.0000.00717.46
8.1.60.0080.00017.55
8.1.50.0000.00817.67
8.1.40.0000.00717.49
8.1.30.0050.00317.67
8.1.20.0030.00617.56
8.1.10.0000.00817.64
8.1.00.0040.00417.39
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0030.00318.50
8.0.270.0000.00717.34
8.0.260.0030.00317.25
8.0.250.0030.00317.04
8.0.240.0000.00717.08
8.0.230.0070.00017.07
8.0.220.0030.00316.91
8.0.210.0030.00317.01
8.0.200.0040.00416.93
8.0.190.0000.00816.92
8.0.180.0000.00716.98
8.0.170.0040.00416.99
8.0.160.0040.00316.98
8.0.150.0030.00616.97
8.0.140.0080.00016.99
8.0.130.0000.00513.43
8.0.120.0070.00016.92
8.0.110.0050.00216.84
8.0.100.0030.00516.84
8.0.90.0040.00416.88
8.0.80.0140.00317.02
8.0.70.0040.00417.09
8.0.60.0040.00416.97
8.0.50.0070.00016.80
8.0.30.0110.00717.30
8.0.20.0090.01017.40
8.0.10.0000.00716.93
8.0.00.0100.00716.95
7.4.330.0000.00615.20
7.4.320.0030.00316.69
7.4.300.0070.00016.60
7.4.290.0030.00616.72
7.4.280.0000.00716.59
7.4.270.0030.00316.68
7.4.260.0000.00716.67
7.4.250.0040.00416.56
7.4.240.0030.00316.54
7.4.230.0030.00316.75
7.4.220.0070.01016.62
7.4.210.0040.01016.59
7.4.200.0040.00416.40
7.4.160.0150.00616.38
7.4.150.0090.00917.40
7.4.140.0100.00817.86
7.4.130.0080.01216.48
7.4.120.0070.00916.56
7.4.110.0090.00916.66
7.4.100.0150.00316.41
7.4.90.0110.00716.62
7.4.80.0070.01719.39
7.4.70.0060.01016.47
7.4.60.0060.01916.71
7.4.50.0020.00216.44
7.4.40.0100.00716.78
7.4.30.0060.00916.62
7.4.10.0070.01114.44
7.4.00.0100.00614.95
7.3.330.0000.00613.45
7.3.320.0000.00513.42
7.3.310.0040.00416.61
7.3.300.0030.00316.44
7.3.290.0070.00716.46
7.3.280.0080.01016.42
7.3.270.0120.00617.40
7.3.260.0140.00416.50
7.3.250.0100.01116.63
7.3.240.0110.00616.68
7.3.230.0120.00616.55
7.3.210.0110.00716.48
7.3.200.0070.01019.39
7.3.190.0110.01116.46
7.3.180.0060.01016.59
7.3.170.0100.01316.67
7.3.160.0050.01016.46
7.3.130.0030.01314.69
7.3.120.0070.00914.72
7.3.110.0000.01314.45
7.3.100.0100.00314.89
7.3.90.0070.01014.75
7.3.80.0040.01114.59
7.3.70.0120.00314.84
7.3.60.0110.00414.74
7.3.50.0090.00614.83
7.3.40.0040.01114.39
7.3.30.0040.01114.88
7.3.20.0030.01316.64
7.3.10.0120.00916.31
7.3.00.0100.00716.37
7.2.330.0080.00916.86
7.2.320.0060.00916.76
7.2.310.0060.01316.58
7.2.300.0100.00616.74
7.2.290.0200.01016.70
7.2.260.0070.01315.28
7.2.250.0070.01114.76
7.2.240.0070.00714.98
7.2.230.0100.00614.94
7.2.220.0150.00315.20
7.2.210.0040.01615.03
7.2.200.0070.00714.79
7.2.190.0060.00615.11
7.2.180.0040.00714.60
7.2.170.0030.01514.74
7.2.160.0050.00514.50
7.2.150.0070.01016.92
7.2.140.0040.01117.02
7.2.130.0080.01316.73
7.2.120.0040.01116.75
7.2.110.0050.01016.88
7.2.100.0080.01116.63
7.2.90.0080.01116.51
7.2.80.0090.00916.85
7.2.70.0110.00816.74
7.2.60.0080.01116.77
7.2.50.0090.01216.78
7.2.40.0160.00616.82
7.2.30.0090.00616.66
7.2.20.0110.00716.52
7.2.10.0110.00516.80
7.2.00.0100.00817.83
7.1.330.0030.00715.96
7.1.320.0070.00715.90
7.1.310.0000.01215.73
7.1.300.0030.00615.68
7.1.290.0070.00715.74
7.1.280.0070.00715.52
7.1.270.0030.00615.71
7.1.260.0030.01315.77
7.1.250.0060.00815.41
7.1.240.0090.00615.60
7.1.230.0040.01415.89
7.1.220.0060.01215.72
7.1.210.0120.00315.59
7.1.200.0040.00715.93
7.1.190.0070.01115.97
7.1.180.0030.00615.88
7.1.170.0060.00615.47
7.1.160.0000.01415.66
7.1.150.0060.00815.93
7.1.140.0030.00615.82
7.1.130.0060.00915.68
7.1.120.0040.00715.89
7.1.110.0100.00315.38
7.1.100.0070.00716.98
7.1.90.0070.00415.93
7.1.80.0120.00615.98
7.1.70.0070.00716.46
7.1.60.0070.01017.89
7.1.50.0150.00316.41
7.1.40.0070.00715.80
7.1.30.0110.00315.55
7.1.20.0030.01615.75
7.1.10.0000.01415.43
7.1.00.0030.04419.02
7.0.330.0130.00015.38
7.0.320.0040.01215.39
7.0.310.0100.00315.03
7.0.300.0040.01215.23
7.0.290.0090.00015.32
7.0.280.0000.01315.43
7.0.270.0040.01215.38
7.0.260.0070.00715.44
7.0.250.0030.00715.20
7.0.240.0040.01115.29
7.0.230.0110.00415.56
7.0.220.0150.00315.39
7.0.210.0060.01215.39
7.0.200.0040.00816.18
7.0.190.0130.00015.28
7.0.180.0070.00415.45
7.0.170.0080.00315.40
7.0.160.0000.01315.47
7.0.150.0060.00615.23
7.0.140.0060.03818.69
7.0.130.0040.00415.46
7.0.120.0060.00615.59
7.0.110.0030.00615.35
7.0.100.0070.03717.80
7.0.90.0050.02517.80
7.0.80.0020.02917.69
7.0.70.0070.03817.69
7.0.60.0080.02117.69
7.0.50.0160.02317.88
7.0.40.0060.02616.71
7.0.30.0090.02316.66
7.0.20.0020.02916.81
7.0.10.0030.02416.77
7.0.00.0040.02616.85
5.6.400.0030.01214.48
5.6.390.0070.00714.23
5.6.380.0030.01514.29
5.6.370.0030.01014.08
5.6.360.0070.00714.60
5.6.350.0070.00714.14
5.6.340.0120.00314.66
5.6.330.0040.01214.33
5.6.320.0070.00314.41
5.6.310.0060.01214.61
5.6.300.0080.00314.36
5.6.290.0000.01414.59
5.6.280.0000.04517.57
5.6.270.0080.00414.16
5.6.260.0030.01014.17
5.6.250.0030.03517.38
5.6.240.0060.02417.45
5.6.230.0040.02617.56
5.6.220.0050.03717.54
5.6.210.0090.02517.63
5.6.200.0050.03417.80
5.6.190.0030.02417.60
5.6.180.0070.02117.68
5.6.170.0020.04517.70
5.6.160.0030.02617.71
5.6.150.0050.02417.69
5.6.140.0050.02217.61
5.6.130.0030.05017.72
5.6.120.0000.03017.56
5.6.110.0110.01817.58
5.6.100.0100.02217.56
5.6.90.0040.04117.49
5.6.80.0080.02817.20
5.6.70.0080.02117.24
5.6.60.0050.04317.28
5.6.50.0090.04517.28
5.6.40.0120.03817.26
5.6.30.0100.03817.37
5.6.20.0070.04317.35
5.6.10.0070.04317.30
5.6.00.0030.04617.22
5.5.380.0020.02817.27
5.5.370.0070.04417.52
5.5.360.0070.03917.36
5.5.350.0050.02317.22
5.5.340.0050.03817.53
5.5.330.0080.01817.63
5.5.320.0070.03517.60
5.5.310.0070.02217.62
5.5.300.0140.03917.73
5.5.290.0080.03017.59
5.5.280.0070.02317.58
5.5.270.0070.02817.50
5.5.260.0000.02817.49
5.5.250.0050.02817.56
5.5.240.0050.02217.20
5.5.230.0000.03317.24
5.5.220.0030.04517.24
5.5.210.0080.03917.30
5.5.200.0030.03817.12
5.5.190.0070.04417.27
5.5.180.0050.02917.27
5.5.170.0040.00813.87
5.5.160.0070.04017.14
5.5.150.0070.03917.13
5.5.140.0070.02717.15
5.5.130.0130.04017.05
5.5.120.0050.04417.30
5.5.110.0060.04417.04
5.5.100.0080.03517.24
5.5.90.0070.03517.19
5.5.80.0030.04717.23
5.5.70.0050.04417.01
5.5.60.0050.02217.29
5.5.50.0110.03317.19
5.5.40.0090.04017.26
5.5.30.0070.04416.91
5.5.20.0030.04617.15
5.5.10.0050.04017.07
5.5.00.0050.03716.98
5.4.450.0020.03215.44
5.4.440.0030.02014.99
5.4.430.0060.03315.14
5.4.420.0030.02215.28
5.4.410.0040.02815.21
5.4.400.0050.04014.95
5.4.390.0040.02414.88
5.4.380.0020.04414.96
5.4.370.0030.03014.98
5.4.360.0060.04015.07
5.4.350.0070.03814.89
5.4.340.0080.04015.05
5.4.330.0060.00311.36
5.4.320.0080.03814.93
5.4.310.0100.03514.89
5.4.300.0050.04714.91
5.4.290.0050.04314.82
5.4.280.0070.04315.09
5.4.270.0100.03814.98
5.4.260.0060.03515.13
5.4.250.0050.02614.96
5.4.240.0100.03614.89
5.4.230.0070.03815.07
5.4.220.0070.03514.93
5.4.210.0050.04215.09
5.4.200.0110.03715.04
5.4.190.0110.03815.02
5.4.180.0070.03915.03
5.4.170.0160.03214.99
5.4.160.0050.04315.26
5.4.150.0070.03814.88
5.4.140.0030.04213.58
5.4.130.0070.03513.52
5.4.120.0040.03613.73
5.4.110.0100.03513.72
5.4.100.0110.03513.70
5.4.90.0070.03813.73
5.4.80.0050.03513.65
5.4.70.0080.03613.80
5.4.60.0050.04213.54
5.4.50.0020.02713.64
5.4.40.0090.03313.55
5.4.30.0110.03113.57
5.4.20.0030.04213.58
5.4.10.0050.04213.70
5.4.00.0060.03813.50
5.3.290.0020.02712.56
5.3.280.0070.03712.49
5.3.270.0020.02512.69
5.3.260.0030.04512.66
5.3.250.0050.03612.61
5.3.240.0080.03612.56
5.3.230.0050.03712.65
5.3.220.0100.03212.36
5.3.210.0070.04112.32
5.3.200.0030.03512.35
5.3.190.0030.04212.39
5.3.180.0040.04112.55
5.3.170.0080.03812.58
5.3.160.0140.03012.54
5.3.150.0060.03812.56
5.3.140.0000.04612.50
5.3.130.0050.04012.40
5.3.120.0050.04312.64
5.3.110.0080.03712.48
5.3.100.0070.04012.24
5.3.90.0080.03712.34
5.3.80.0080.03312.25
5.3.70.0110.03512.30
5.3.60.0060.03612.29
5.3.50.0030.04312.21
5.3.40.0020.02712.21
5.3.30.0070.03512.44
5.3.20.0050.03812.14
5.3.10.0050.03911.90
5.3.00.0060.03611.95
5.2.170.0000.06311.20
5.2.160.0100.05711.06
5.2.150.0070.06311.20
5.2.140.0030.04011.07
5.2.130.0000.06311.09
5.2.120.0030.06011.23
5.2.110.0030.06310.98
5.2.100.0030.04311.01
5.2.90.0070.05711.11
5.2.80.0030.06711.23
5.2.70.0030.06310.98
5.2.60.0100.05710.97
5.2.50.0070.05311.04
5.2.40.0170.05011.08
5.2.30.0070.06011.04
5.2.20.0030.06711.09
5.2.10.0070.05710.78
5.2.00.0000.04010.72
5.1.60.0030.03310.08
5.1.50.0000.0539.84
5.1.40.0030.0409.97
5.1.30.0070.05710.26
5.1.20.0030.05310.46
5.1.10.0070.05010.06
5.1.00.0000.05010.18
5.0.50.0030.0409.47
5.0.40.0030.0439.47
5.0.30.0000.0709.47
5.0.20.0030.0439.47
5.0.10.0000.0409.47
5.0.00.0030.0639.47
4.4.90.0030.0239.47
4.4.80.0030.0339.47
4.4.70.0030.0339.47
4.4.60.0000.0309.47
4.4.50.0000.0339.47
4.4.40.0030.0539.47
4.4.30.0070.0279.47
4.4.20.0030.0339.47
4.4.10.0030.0379.47
4.4.00.0000.0309.47
4.3.110.0000.0379.47
4.3.100.0000.0379.47
4.3.90.0030.0309.47
4.3.80.0030.0379.47
4.3.70.0030.0339.47
4.3.60.0000.0379.47
4.3.50.0030.0309.47
4.3.40.0000.0409.47
4.3.30.0000.0179.47
4.3.20.0000.0179.47
4.3.10.0030.0339.47
4.3.00.0000.0309.47

preferences:
63.3 ms | 400 KiB | 5 Q