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); 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.0140.00718.18
8.3.50.0070.01421.14
8.3.40.0070.00718.71
8.3.30.0100.00320.26
8.3.20.0080.00020.43
8.3.10.0000.00821.27
8.3.00.0000.00822.45
8.2.180.0120.00916.75
8.2.170.0090.00922.96
8.2.160.0070.00722.21
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0070.00020.79
8.2.110.0000.00920.61
8.2.100.0070.00417.78
8.2.90.0060.00317.91
8.2.80.0000.00817.97
8.2.70.0060.00317.62
8.2.60.0040.00417.93
8.2.50.0060.00318.07
8.2.40.0040.00418.28
8.2.30.0030.00619.52
8.2.20.0000.00817.62
8.2.10.0070.00017.64
8.2.00.0060.00317.69
8.1.280.0040.01125.92
8.1.270.0040.00423.99
8.1.260.0000.00826.35
8.1.250.0000.00728.09
8.1.240.0030.00622.27
8.1.230.0120.00021.02
8.1.220.0060.00317.76
8.1.210.0050.00318.93
8.1.200.0030.00717.35
8.1.190.0000.00817.52
8.1.180.0040.00418.10
8.1.170.0000.00918.70
8.1.160.0040.00418.96
8.1.150.0090.00018.73
8.1.140.0040.00417.54
8.1.130.0070.00017.84
8.1.120.0030.00717.61
8.1.110.0080.00017.55
8.1.100.0000.00717.53
8.1.90.0000.00717.53
8.1.80.0050.00317.59
8.1.70.0040.00417.50
8.1.60.0030.00617.61
8.1.50.0040.00417.58
8.1.40.0030.00617.48
8.1.30.0000.00717.71
8.1.20.0030.00617.74
8.1.10.0000.00717.66
8.1.00.0050.00317.49
8.0.300.0020.00520.05
8.0.290.0040.00417.30
8.0.280.0030.00318.44
8.0.270.0030.00317.45
8.0.260.0030.00316.95
8.0.250.0000.00717.07
8.0.240.0000.00816.97
8.0.230.0050.00217.05
8.0.220.0000.00716.87
8.0.210.0070.00016.95
8.0.200.0050.00217.00
8.0.190.0040.00416.87
8.0.180.0040.00417.00
8.0.170.0080.00017.00
8.0.160.0030.00317.02
8.0.150.0000.00816.81
8.0.140.0000.00716.86
8.0.130.0030.00313.38
8.0.120.0040.00416.84
8.0.110.0000.00716.88
8.0.100.0040.00417.02
8.0.90.0080.00016.80
8.0.80.0070.00716.90
8.0.70.0070.00016.86
8.0.60.0000.00716.96
8.0.50.0040.00417.01
8.0.30.0090.01317.21
8.0.20.0120.01117.40
8.0.10.0000.00716.93
8.0.00.0080.01016.67
7.4.330.0050.00016.91
7.4.320.0030.00316.68
7.4.300.0000.00616.59
7.4.290.0030.00316.70
7.4.280.0030.00316.72
7.4.270.0000.00716.69
7.4.260.0000.00513.34
7.4.250.0040.00416.56
7.4.240.0080.00016.67
7.4.230.0030.00316.57
7.4.220.0100.00716.72
7.4.210.0030.01116.60
7.4.200.0030.00316.33
7.4.190.0030.00316.54
7.4.160.0060.01316.52
7.4.150.0100.00717.40
7.4.140.0100.00817.86
7.4.130.0100.00716.56
7.4.120.0100.00716.54
7.4.110.0030.01316.65
7.4.100.0130.00616.56
7.4.90.0070.01016.59
7.4.80.0340.01219.39
7.4.70.0030.01316.46
7.4.60.0070.01016.67
7.4.50.0030.00616.37
7.4.40.0090.00322.77
7.4.30.0100.00616.48
7.4.00.0100.00615.02
7.3.330.0050.00013.31
7.3.320.0030.00313.42
7.3.310.0000.00716.48
7.3.300.0050.00316.40
7.3.290.0040.01116.45
7.3.280.0040.01216.43
7.3.270.0110.00717.40
7.3.260.0070.01418.24
7.3.250.0060.01116.60
7.3.240.0100.00716.44
7.3.230.0160.00016.74
7.3.210.0070.01016.78
7.3.200.0090.00919.39
7.3.190.0100.01016.65
7.3.180.0140.00316.65
7.3.170.0080.00716.46
7.3.160.0120.00916.40
7.3.120.0080.00714.95
7.3.110.0080.00814.55
7.3.100.0130.00714.88
7.3.90.0000.01315.01
7.3.80.0030.01415.07
7.3.70.0060.00614.86
7.3.60.0070.00714.75
7.3.50.0070.00714.89
7.3.40.0070.01014.94
7.3.30.0060.00614.76
7.3.20.0040.01216.77
7.3.10.0060.01016.48
7.3.00.0100.00316.65
7.2.330.0090.00916.81
7.2.320.0070.01016.71
7.2.310.0100.00716.57
7.2.300.0130.00316.87
7.2.290.0030.01316.60
7.2.250.0030.01414.89
7.2.240.0150.00314.86
7.2.230.0080.00614.85
7.2.220.0140.00415.20
7.2.210.0030.01015.28
7.2.200.0070.00714.96
7.2.190.0080.00814.90
7.2.180.0000.01715.01
7.2.170.0040.00415.12
7.2.160.0030.01015.05
7.2.150.0000.01017.02
7.2.140.0120.00016.97
7.2.130.0150.00216.74
7.2.120.0030.01216.60
7.2.110.0090.00516.45
7.2.100.0100.00716.90
7.2.90.0130.00616.82
7.2.80.0050.01116.92
7.2.70.0130.00816.77
7.2.60.0080.01216.91
7.2.50.0120.01016.58
7.2.40.0050.00916.87
7.2.30.0100.00316.72
7.2.20.0090.01016.48
7.2.10.0100.01016.75
7.2.00.0060.00917.58
7.1.330.0070.01115.92
7.1.320.0040.01115.63
7.1.310.0000.01315.65
7.1.300.0060.00916.02
7.1.290.0040.01215.82
7.1.280.0040.00715.80
7.1.270.0060.00615.71
7.1.260.0040.00415.84
7.1.250.0090.00515.59
7.1.240.0030.00715.58
7.1.230.0030.00715.82
7.1.220.0000.01415.66
7.1.210.0030.01015.61
7.1.200.0050.00815.79
7.1.190.0040.00715.81
7.1.180.0030.01016.01
7.1.170.0030.00615.73
7.1.160.0080.00015.49
7.1.150.0070.00715.63
7.1.140.0060.00615.84
7.1.130.0060.00615.83
7.1.120.0030.00715.68
7.1.110.0070.00415.87
7.1.100.0060.01017.04
7.1.90.0090.00615.79
7.1.80.0120.00315.76
7.1.70.0090.00616.58
7.1.60.0050.00616.56
7.1.50.0050.01216.30
7.1.40.0030.01016.02
7.1.30.0000.01515.86
7.1.20.0070.00715.85
7.1.10.0030.01015.73
7.1.00.0020.04318.97
7.0.330.0040.01115.44
7.0.320.0090.00615.18
7.0.310.0000.01315.50
7.0.300.0060.00615.27
7.0.290.0030.00615.11
7.0.280.0030.00515.43
7.0.270.0080.00415.24
7.0.260.0030.00615.45
7.0.250.0000.01215.19
7.0.240.0000.01415.24
7.0.230.0090.00615.50
7.0.220.0090.00315.34
7.0.210.0000.01315.39
7.0.200.0050.00516.02
7.0.190.0040.00415.56
7.0.180.0080.00615.38
7.0.170.0120.00015.24
7.0.160.0040.01415.39
7.0.150.0040.00815.42
7.0.140.0050.04018.58
7.0.130.0060.00615.28
7.0.120.0000.01515.62
7.0.110.0020.03317.76
7.0.100.0110.04117.70
7.0.90.0050.02517.66
7.0.80.0030.02717.68
7.0.70.0050.04317.75
7.0.60.0070.02317.70
7.0.50.0080.03017.72
7.0.40.0020.02816.58
7.0.30.0060.02816.46
7.0.20.0050.02316.47
7.0.10.0020.02916.68
7.0.00.0090.04416.61
5.6.400.0000.01314.59
5.6.390.0070.00414.36
5.6.380.0120.00314.30
5.6.370.0080.00614.46
5.6.360.0000.00814.50
5.6.350.0100.00314.53
5.6.340.0030.00914.51
5.6.330.0070.00714.62
5.6.320.0030.00714.50
5.6.310.0000.01513.98
5.6.300.0060.00614.23
5.6.290.0030.00914.23
5.6.280.0050.04017.80
5.6.270.0060.00314.50
5.6.260.0110.01817.52
5.6.250.0030.02917.53
5.6.240.0050.04517.54
5.6.230.0050.02717.46
5.6.220.0060.02617.59
5.6.210.0060.02017.51
5.6.200.0020.04417.58
5.6.190.0030.03817.45
5.6.180.0030.02817.38
5.6.170.0030.02517.34
5.6.160.0030.04017.47
5.6.150.0000.03217.39
5.6.140.0060.03317.57
5.6.130.0060.02317.43
5.6.120.0070.02017.62
5.6.110.0120.02017.25
5.6.100.0070.04517.56
5.6.90.0050.02217.53
5.6.80.0080.02017.21
5.6.70.0070.03317.21
5.6.60.0040.02117.14
5.6.50.0040.02417.19
5.6.40.0070.02417.00
5.6.30.0080.02317.14
5.6.20.0020.02417.02
5.6.10.0050.02517.12
5.6.00.0100.01817.09
5.5.380.0070.02015.90
5.5.370.0080.03515.91
5.5.360.0060.02615.68
5.5.350.0090.03715.92
5.5.340.0080.03215.88
5.5.330.0070.04216.16
5.5.320.0070.02215.99
5.5.310.0090.02416.21
5.5.300.0100.03016.24
5.5.290.0080.02015.90
5.5.280.0050.04015.89
5.5.270.0050.01816.07
5.5.260.0030.02716.21
5.5.250.0060.02215.83
5.5.240.0070.03015.54
5.5.230.0040.02215.75
5.5.220.0060.02115.73
5.5.210.0040.02915.97
5.5.200.0100.01815.92
5.5.190.0050.02415.59
5.5.180.0050.02215.66
5.5.170.0070.01014.12
5.5.160.0030.02615.88
5.5.150.0000.02815.65
5.5.140.0070.03515.83
5.5.130.0050.03215.71
5.5.120.0020.02515.67
5.5.110.0050.02215.81
5.5.100.0030.02615.67
5.5.90.0080.03315.84
5.5.80.0050.02715.55
5.5.70.0020.02215.65
5.5.60.0080.01515.71
5.5.50.0060.02015.60
5.5.40.0020.02115.65
5.5.30.0060.02315.51
5.5.20.0080.02215.74
5.5.10.0040.02515.83
5.5.00.0030.02415.90
5.4.450.0030.02415.14
5.4.440.0070.02315.34
5.4.430.0080.01815.23
5.4.420.0000.03015.23
5.4.410.0070.02015.21
5.4.400.0060.02114.90
5.4.390.0050.02315.14
5.4.380.0010.02314.98
5.4.370.0050.02015.06
5.4.360.0070.02615.05
5.4.350.0020.02715.15
5.4.340.0080.03114.92
5.4.330.0120.00310.78
5.4.320.0030.02114.97
5.4.310.0080.02015.15
5.4.300.0020.03415.05
5.4.290.0020.02614.85
5.4.280.0050.02115.02
5.4.270.0020.02515.12
5.4.260.0030.02314.85
5.4.250.0060.02015.19
5.4.240.0080.01814.91
5.4.230.0060.02014.92
5.4.220.0050.01914.82
5.4.210.0050.02114.93
5.4.200.0050.01715.06
5.4.190.0040.02614.86
5.4.180.0000.03414.89
5.4.170.0020.02315.08
5.4.160.0020.02214.93
5.4.150.0090.03214.97
5.4.140.0030.02313.56
5.4.130.0000.02613.57
5.4.120.0020.02413.49
5.4.110.0040.01913.70
5.4.100.0030.01813.72
5.4.90.0070.02513.57
5.4.80.0050.02013.61
5.4.70.0050.02813.65
5.4.60.0050.01713.67
5.4.50.0070.01713.68
5.4.40.0020.02013.59
5.4.30.0030.02113.66
5.4.20.0030.02513.63
5.4.10.0020.02113.69
5.4.00.0000.02313.36
5.3.290.0050.02412.79
5.3.280.0060.02112.63
5.3.270.0040.02012.72
5.3.260.0060.02112.71
5.3.250.0050.02012.71
5.3.240.0050.02512.71
5.3.230.0050.02212.65
5.3.220.0100.02012.63
5.3.210.0030.02012.69
5.3.200.0070.01912.74
5.3.190.0010.02112.61
5.3.180.0000.02412.62
5.3.170.0080.01412.70
5.3.160.0040.02012.69
5.3.150.0030.01912.70
5.3.140.0070.01712.66
5.3.130.0050.02512.69
5.3.120.0040.01912.64
5.3.110.0050.02112.61
5.3.100.0030.02112.43
5.3.90.0090.01812.40
5.3.80.0050.02012.46
5.3.70.0050.03012.32
5.3.60.0020.02012.34
5.3.50.0020.02012.39
5.3.40.0080.01512.38
5.3.30.0060.03812.39
5.3.20.0070.01912.20
5.3.10.0030.01912.19
5.3.00.0040.01712.17
5.2.170.0030.02711.93
5.2.160.0070.03711.93
5.2.150.0000.04011.93
5.2.140.0000.02711.93
5.2.130.0000.03711.93
5.2.120.0000.02711.93
5.2.110.0070.02711.93
5.2.100.0070.03711.93
5.2.90.0030.02711.93
5.2.80.0000.02711.93
5.2.70.0000.02711.93
5.2.60.0000.02711.93
5.2.50.0030.02711.93
5.2.40.0030.03011.93
5.2.30.0030.03011.93
5.2.20.0030.02711.93
5.2.10.0030.04011.93
5.2.00.0030.03311.93
5.1.60.0000.03311.93
5.1.50.0000.02711.93
5.1.40.0030.02311.93
5.1.30.0030.02011.93
5.1.20.0000.03011.93
5.1.10.0000.02311.93
5.1.00.0000.02311.93
5.0.50.0030.02011.93
5.0.40.0000.02011.93
5.0.30.0000.03011.93
5.0.20.0000.02011.93
5.0.10.0030.02011.93
5.0.00.0000.02711.93
4.4.90.0030.01011.93
4.4.80.0030.01311.93
4.4.70.0000.01711.93
4.4.60.0000.01311.93
4.4.50.0030.01311.93
4.4.40.0030.02311.93
4.4.30.0030.01711.93
4.4.20.0030.01311.93
4.4.10.0030.02311.93
4.4.00.0030.02311.93
4.3.110.0030.01311.93
4.3.100.0000.01711.93
4.3.90.0030.01311.93
4.3.80.0000.02311.93
4.3.70.0070.01011.93
4.3.60.0070.01011.93
4.3.50.0000.01711.93
4.3.40.0030.02711.93
4.3.30.0070.00711.93
4.3.20.0000.01711.93
4.3.10.0000.01711.93
4.3.00.0070.01711.93

preferences:
49.69 ms | 401 KiB | 5 Q