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

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.0150.00618.31
8.3.50.0110.00821.21
8.3.40.0040.01118.83
8.3.30.0030.01020.38
8.3.20.0070.00020.23
8.3.10.0080.00021.22
8.3.00.0040.00422.25
8.2.180.0110.01116.88
8.2.170.0100.01022.96
8.2.160.0100.00322.26
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00020.93
8.2.110.0000.00919.27
8.2.100.0090.00317.72
8.2.90.0020.00519.22
8.2.80.0040.00418.16
8.2.70.0040.00417.63
8.2.60.0050.00318.03
8.2.50.0030.00518.07
8.2.40.0040.00418.15
8.2.30.0040.00419.39
8.2.20.0000.00717.64
8.2.10.0070.00017.83
8.2.00.0000.00817.92
8.1.280.0110.00825.92
8.1.270.0040.00423.99
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0180.00422.46
8.1.230.0040.00821.03
8.1.220.0040.00418.77
8.1.210.0000.00819.23
8.1.200.0060.00617.23
8.1.190.0040.00417.55
8.1.180.0030.00518.10
8.1.170.0040.00418.55
8.1.160.0000.00718.98
8.1.150.0080.00318.71
8.1.140.0000.00717.58
8.1.130.0040.00417.90
8.1.120.0000.00917.55
8.1.110.0030.00317.39
8.1.100.0040.00417.57
8.1.90.0040.00417.49
8.1.80.0030.00317.49
8.1.70.0030.00317.51
8.1.60.0060.00317.69
8.1.50.0040.00417.50
8.1.40.0040.00417.60
8.1.30.0040.00417.54
8.1.20.0040.00417.77
8.1.10.0070.00017.50
8.1.00.0050.00317.41
8.0.300.0050.00319.89
8.0.290.0000.00817.17
8.0.280.0040.00418.53
8.0.270.0070.00017.34
8.0.260.0070.00016.91
8.0.250.0030.00317.04
8.0.240.0040.00416.97
8.0.230.0050.00317.02
8.0.220.0000.00716.94
8.0.210.0030.00316.81
8.0.200.0000.00817.03
8.0.190.0000.00717.00
8.0.180.0030.00616.93
8.0.170.0000.00816.97
8.0.160.0080.00016.97
8.0.150.0030.00317.00
8.0.140.0000.00816.95
8.0.130.0000.00513.44
8.0.120.0000.00716.89
8.0.110.0040.00416.79
8.0.100.0040.00416.84
8.0.90.0020.00516.93
8.0.80.0090.00616.99
8.0.70.0040.00416.87
8.0.60.0040.00417.02
8.0.50.0040.00416.98
8.0.30.0130.00617.16
8.0.20.0050.01317.40
8.0.10.0040.00416.91
8.0.00.0070.01216.81
7.4.330.0050.00016.84
7.4.320.0060.00016.66
7.4.300.0060.00016.62
7.4.290.0000.00716.51
7.4.280.0040.00416.58
7.4.270.0080.00016.70
7.4.260.0030.00313.35
7.4.250.0060.00316.69
7.4.240.0040.00316.62
7.4.230.0070.00016.77
7.4.220.0100.01016.66
7.4.210.0080.00916.71
7.4.200.0030.00516.42
7.4.190.0070.00016.52
7.4.160.0100.01016.50
7.4.150.0100.00917.40
7.4.140.0130.00417.86
7.4.130.0080.01016.57
7.4.120.0080.00916.65
7.4.110.0100.00616.56
7.4.100.0100.00716.64
7.4.90.0040.01516.64
7.4.80.0190.00319.39
7.4.70.0080.00816.72
7.4.60.0130.00316.58
7.4.50.0040.00416.66
7.4.40.0030.01022.77
7.4.30.0140.00916.63
7.4.10.0120.00614.98
7.4.00.0030.01414.85
7.3.330.0050.00013.27
7.3.320.0050.00013.17
7.3.310.0000.00716.34
7.3.300.0050.00316.46
7.3.290.0090.00916.45
7.3.280.0120.00416.46
7.3.270.0100.00717.40
7.3.260.0100.00918.24
7.3.250.0100.00916.55
7.3.240.0030.01416.64
7.3.230.0080.00816.50
7.3.210.0100.00616.52
7.3.200.0120.00919.39
7.3.190.0110.01116.64
7.3.180.0030.01316.68
7.3.170.0030.01316.64
7.3.160.0100.00716.56
7.3.130.0070.00714.84
7.3.120.0090.00814.94
7.3.110.0070.01014.98
7.3.100.0080.00715.10
7.3.90.0050.01015.01
7.3.80.0090.00314.86
7.3.70.0050.00814.68
7.3.60.0050.00814.71
7.3.50.0050.00814.77
7.3.40.0070.00714.55
7.3.30.0050.00714.73
7.3.20.0060.00716.72
7.3.10.0040.00816.55
7.3.00.0060.00616.46
7.2.330.0100.01116.65
7.2.320.0100.01316.84
7.2.310.0040.01416.67
7.2.300.0110.00616.77
7.2.290.0100.01016.88
7.2.260.0100.01015.24
7.2.250.0070.01215.09
7.2.240.0070.01014.87
7.2.230.0040.01315.09
7.2.220.0050.01015.05
7.2.210.0050.00915.10
7.2.200.0030.01215.07
7.2.190.0040.00614.91
7.2.180.0110.00515.13
7.2.170.0050.00915.02
7.2.160.0030.01014.89
7.2.150.0040.00417.02
7.2.140.0060.00616.96
7.2.130.0100.00316.90
7.2.120.0040.01216.99
7.2.110.0060.01017.00
7.2.100.0000.01217.00
7.2.90.0060.00316.68
7.2.80.0040.01217.08
7.2.70.0060.00316.94
7.2.60.0060.00916.80
7.2.50.0110.00317.05
7.2.40.0030.00716.75
7.2.30.0100.00717.04
7.2.20.0090.00316.55
7.2.10.0070.00716.74
7.2.00.0040.01116.94
7.1.330.0060.00615.90
7.1.320.0040.00915.84
7.1.310.0070.00915.90
7.1.300.0090.00415.81
7.1.290.0070.00715.66
7.1.280.0070.00815.82
7.1.270.0030.00615.56
7.1.260.0030.00815.92
7.1.250.0050.00516.06
7.1.240.0080.00415.61
7.1.230.0080.00815.68
7.1.220.0000.01215.83
7.1.210.0040.00815.80
7.1.200.0000.01515.71
7.1.190.0030.00615.76
7.1.180.0030.00615.75
7.1.170.0060.00615.90
7.1.160.0040.00715.94
7.1.150.0080.00815.74
7.1.140.0030.00915.93
7.1.130.0160.00015.58
7.1.120.0060.00615.65
7.1.110.0120.00315.86
7.1.100.0060.00915.83
7.1.90.0000.01115.63
7.1.80.0030.00916.00
7.1.70.0050.00916.40
7.1.60.0060.00817.60
7.1.50.0080.00316.48
7.1.40.0050.00315.56
7.1.30.0080.00015.51
7.1.20.0050.00315.88
7.1.10.0070.00715.82
7.1.00.0060.02019.03
7.0.330.0060.00315.52
7.0.320.0120.00315.49
7.0.310.0030.01015.50
7.0.300.0070.00715.41
7.0.290.0000.01315.65
7.0.280.0040.00415.46
7.0.270.0030.00615.37
7.0.260.0030.01215.36
7.0.250.0040.01015.50
7.0.240.0070.00415.57
7.0.230.0030.01015.17
7.0.220.0000.00815.31
7.0.210.0070.00715.11
7.0.200.0030.00716.02
7.0.190.0030.01315.48
7.0.180.0000.01215.25
7.0.170.0040.00715.30
7.0.160.0100.00015.11
7.0.150.0070.00715.47
7.0.140.0070.03718.74
7.0.130.0140.00015.56
7.0.120.0040.00715.12
7.0.110.0030.00915.30
7.0.100.0070.00415.47
7.0.90.0000.01715.52
7.0.80.0080.02717.77
7.0.70.0170.03117.64
7.0.60.0080.04517.73
7.0.50.0250.03817.83
7.0.40.0110.03816.71
7.0.30.0090.03916.80
7.0.20.0120.03216.84
7.0.10.0110.04116.79
7.0.00.0050.04716.75
5.6.400.0080.00814.51
5.6.390.0110.00414.19
5.6.380.0070.00714.43
5.6.370.0030.00714.78
5.6.360.0060.00314.17
5.6.350.0060.00614.24
5.6.340.0000.00814.32
5.6.330.0060.00814.31
5.6.320.0040.01114.64
5.6.310.0000.01214.55
5.6.300.0100.01014.62
5.6.290.0070.01014.52
5.6.280.0020.04117.76
5.6.270.0030.01214.49
5.6.260.0070.00714.55
5.6.250.0060.00614.29
5.6.240.0000.01314.38
5.6.230.0050.04217.53
5.6.220.0030.03217.50
5.6.210.0070.03417.60
5.6.200.0030.03217.66
5.6.190.0070.02917.54
5.6.180.0080.02417.69
5.6.170.0020.04717.61
5.6.160.0090.04317.63
5.6.150.0150.04017.63
5.6.140.0050.03717.56
5.6.130.0100.02717.63
5.6.120.0080.04617.55
5.6.110.0050.02717.76
5.6.100.0050.03817.48
5.6.90.0070.04217.73
5.6.80.0030.02517.22
5.6.70.0090.03817.42
5.6.60.0070.04017.37
5.6.50.0050.03217.26
5.6.40.0100.03717.33
5.6.30.0110.04317.25
5.6.20.0050.02917.35
5.6.10.0070.04117.35
5.6.00.0100.03817.41
5.5.380.0030.00914.43
5.5.370.0090.03617.34
5.5.360.0130.04017.20
5.5.350.0100.04217.13
5.5.340.0100.03717.76
5.5.330.0090.04517.68
5.5.320.0070.02517.50
5.5.310.0050.04817.41
5.5.300.0070.04717.43
5.5.290.0050.03517.48
5.5.280.0030.05217.71
5.5.270.0070.04517.62
5.5.260.0020.05117.59
5.5.250.0100.04317.45
5.5.240.0050.04417.11
5.5.230.0030.03117.25
5.5.220.0070.04117.06
5.5.210.0110.04417.23
5.5.200.0130.03617.11
5.5.190.0100.03917.12
5.5.180.0050.03517.23
5.5.170.0100.00714.38
5.5.160.0020.04117.36
5.5.150.0040.04117.20
5.5.140.0060.02117.28
5.5.130.0030.02517.16
5.5.120.0050.02417.27
5.5.110.0080.02117.13
5.5.100.0030.02317.08
5.5.90.0100.01517.27
5.5.80.0020.02917.24
5.5.70.0070.04517.05
5.5.60.0070.01817.13
5.5.50.0050.02217.02
5.5.40.0020.02517.07
5.5.30.0060.03017.08
5.5.20.0050.02416.97
5.5.10.0080.02217.06
5.5.00.0070.01817.18
5.4.450.0050.02815.78
5.4.440.0000.03515.92
5.4.430.0080.03715.77
5.4.420.0050.02715.92
5.4.410.0060.02415.89
5.4.400.0050.03915.80
5.4.390.0100.02315.74
5.4.380.0100.03415.67
5.4.370.0070.04015.63
5.4.360.0060.04215.71
5.4.350.0100.03315.75
5.4.340.0030.02815.78
5.4.330.0090.00312.38
5.4.320.0130.03615.81
5.4.310.0070.03415.78
5.4.300.0030.02115.75
5.4.290.0050.02215.70
5.4.280.0040.02415.65
5.4.270.0050.02615.77
5.4.260.0040.02015.61
5.4.250.0030.01915.71
5.4.240.0000.02415.79
5.4.230.0060.02115.79
5.4.220.0070.02015.75
5.4.210.0050.01815.77
5.4.200.0070.03015.73
5.4.190.0050.02015.62
5.4.180.0060.01515.61
5.4.170.0050.02315.74
5.4.160.0030.01815.70
5.4.150.0000.02415.74
5.4.140.0040.02114.39
5.4.130.0050.03014.43
5.4.120.0060.01614.39
5.4.110.0050.04014.37
5.4.100.0030.02314.35
5.4.90.0030.02514.41
5.4.80.0040.02014.38
5.4.70.0030.02214.36
5.4.60.0050.03214.41
5.4.50.0080.01814.42
5.4.40.0050.02014.42
5.4.30.0050.02114.34
5.4.20.0040.01814.43
5.4.10.0000.02914.31
5.4.00.0030.02014.08
5.3.290.0030.04513.52
5.3.280.0050.01713.46
5.3.270.0070.02013.55
5.3.260.0050.03813.45
5.3.250.0030.03113.54
5.3.240.0100.01713.49
5.3.230.0060.01813.55
5.3.220.0030.02713.53
5.3.210.0030.02513.45
5.3.200.0030.02213.48
5.3.190.0000.02613.45
5.3.180.0000.02513.46
5.3.170.0050.01813.46
5.3.160.0050.04013.45
5.3.150.0070.03513.46
5.3.140.0050.02313.54
5.3.130.0020.02313.51
5.3.120.0020.02713.47
5.3.110.0050.02013.51
5.3.100.0030.03013.23
5.3.90.0020.02513.16
5.3.80.0070.01713.14
5.3.70.0020.02213.23
5.3.60.0030.02113.16
5.3.50.0050.02213.11
5.3.40.0030.02313.11
5.3.30.0020.02213.19
5.3.20.0050.02213.06
5.3.10.0050.01713.05
5.3.00.0030.03212.96
5.2.170.0030.03011.88
5.2.160.0030.03011.88
5.2.150.0030.02711.88
5.2.140.0000.03011.88
5.2.130.0030.03011.88
5.2.120.0030.03711.88
5.2.110.0000.03311.88
5.2.100.0030.03011.88
5.2.90.0030.05011.88
5.2.80.0000.03011.88
5.2.70.0030.03011.88
5.2.60.0000.05311.88
5.2.50.0100.05311.88
5.2.40.0100.05311.88
5.2.30.0030.06711.88
5.2.20.0130.05311.88
5.2.10.0100.05311.88
5.2.00.0100.05311.88
5.1.60.0030.04011.88
5.1.50.0030.05011.88
5.1.40.0030.04711.88
5.1.30.0030.05711.88
5.1.20.0030.05311.88
5.1.10.0030.03711.88
5.1.00.0000.03011.88
5.0.50.0070.02011.88
5.0.40.0070.03311.88
5.0.30.0100.05711.88
5.0.20.0070.02711.88
5.0.10.0030.04011.88
5.0.00.0030.06711.88
4.4.90.0000.02311.88
4.4.80.0000.01711.88
4.4.70.0000.03711.88
4.4.60.0000.02011.88
4.4.50.0000.03711.88
4.4.40.0030.05311.88
4.4.30.0000.03711.88
4.4.20.0030.02311.88
4.4.10.0000.01711.88
4.4.00.0000.04311.88
4.3.110.0070.02711.88
4.3.100.0030.03311.88
4.3.90.0070.03011.88
4.3.80.0000.05011.88
4.3.70.0030.02711.88
4.3.60.0000.04011.88
4.3.50.0100.02711.88
4.3.40.0000.04011.88
4.3.30.0000.02311.88
4.3.20.0000.03711.88
4.3.10.0000.03011.88
4.3.00.0070.02311.88

preferences:
46.33 ms | 401 KiB | 5 Q