3v4l.org

run code in 300+ PHP versions simultaneously
<?php function strToDuration($str) { sscanf($str, '%d:%d:%d', $hours, $minutes, $seconds); return $seconds + ($minutes * 60) + ($hours * 60 * 60); } function durationToStr($duration) { $hours = floor($duration / (60 * 60)); $seconds %= 60 * 60; $minutes = floor($seconds / 60); $seconds %= 60; return sprintf('%02d:%02d:%02d', $hours, $minutes, $seconds); } $morning = '01:05:12'; $evening = '14:05:29'; echo durationToStr(strToDuration($morning) + strToDuration($evening));

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.40.0150.00318.79
8.3.30.0070.00719.08
8.3.20.0080.00420.42
8.3.10.0060.00322.08
8.3.00.0120.00622.59
8.2.170.0100.00322.96
8.2.160.0100.00319.38
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0030.01526.16
8.2.120.0060.00319.60
8.2.110.0030.00622.33
8.2.100.0060.00619.64
8.2.90.0040.00419.22
8.2.80.0040.00417.97
8.2.70.0030.00617.50
8.2.60.0000.01018.16
8.2.50.0060.00318.07
8.2.40.0030.00520.07
8.2.30.0040.00418.19
8.2.20.0040.00417.83
8.2.10.0000.00817.86
8.2.00.0030.00517.77
8.1.270.0090.00922.22
8.1.260.0060.00326.35
8.1.250.0090.00628.09
8.1.240.0090.00023.86
8.1.230.0080.00318.95
8.1.220.0050.00217.77
8.1.210.0000.00818.77
8.1.200.0070.00317.35
8.1.190.0030.00617.41
8.1.180.0050.00318.75
8.1.170.0030.00618.48
8.1.160.0000.00722.17
8.1.150.0000.00718.54
8.1.140.0090.00017.41
8.1.130.0000.00717.88
8.1.120.0050.00217.50
8.1.110.0040.00417.41
8.1.100.0040.00417.43
8.1.90.0030.00317.42
8.1.80.0000.00717.45
8.1.70.0040.00417.46
8.1.60.0070.00017.59
8.1.50.0090.00017.63
8.1.40.0000.00717.40
8.1.30.0040.00417.68
8.1.20.0000.00917.62
8.1.10.0050.00317.54
8.1.00.0070.00017.52
8.0.300.0000.00718.77
8.0.290.0050.00217.05
8.0.280.0000.00718.42
8.0.270.0030.00517.29
8.0.260.0070.00016.86
8.0.250.0030.00317.07
8.0.240.0040.00417.08
8.0.230.0040.00417.05
8.0.220.0040.00416.91
8.0.210.0030.00317.04
8.0.200.0000.00617.04
8.0.190.0000.00816.92
8.0.180.0030.00316.98
8.0.170.0000.00716.96
8.0.160.0040.00416.99
8.0.150.0040.00316.95
8.0.140.0000.00716.88
8.0.130.0000.00613.30
8.0.120.0040.00416.90
8.0.110.0040.00416.81
8.0.100.0000.00716.83
8.0.90.0060.00316.80
8.0.80.0060.01116.89
8.0.70.0050.00316.98
8.0.60.0000.00816.84
8.0.50.0000.00716.88
8.0.30.0100.00817.25
8.0.20.0110.00817.40
8.0.10.0050.00216.93
8.0.00.0090.00916.67
7.4.330.0030.00315.09
7.4.320.0030.00316.42
7.4.300.0000.00616.56
7.4.290.0030.00316.46
7.4.280.0000.00716.61
7.4.270.0000.00716.55
7.4.260.0030.00316.54
7.4.250.0000.00716.54
7.4.240.0020.00516.62
7.4.230.0030.00316.55
7.4.220.0160.00316.68
7.4.210.0060.00816.61
7.4.200.0000.00716.72
7.4.190.0040.00216.75
7.4.160.0170.00016.70
7.4.150.0130.00317.40
7.4.140.0120.00717.86
7.4.130.0120.00616.66
7.4.120.0100.00816.75
7.4.110.0120.00616.52
7.4.100.0150.00316.56
7.4.90.0080.00816.58
7.4.80.0090.01319.39
7.4.70.0060.01216.51
7.4.60.0090.00816.66
7.4.50.0040.00416.60
7.4.40.0070.00722.77
7.4.30.0060.00916.45
7.4.00.0080.00714.95
7.3.330.0020.00213.32
7.3.320.0020.00213.23
7.3.310.0060.00316.50
7.3.300.0000.00716.49
7.3.290.0140.00016.50
7.3.280.0090.00616.49
7.3.270.0090.00917.40
7.3.260.0000.01716.46
7.3.250.0130.00716.63
7.3.240.0090.00916.70
7.3.230.0140.00716.61
7.3.210.0150.00416.59
7.3.200.0060.01319.39
7.3.190.0110.00816.55
7.3.180.0080.00816.48
7.3.170.0040.01216.48
7.3.160.0060.00916.62
7.3.120.0080.00814.88
7.3.110.0030.01415.11
7.3.100.0000.00914.73
7.3.90.0000.01414.98
7.3.80.0090.00614.68
7.3.70.0000.01014.97
7.3.60.0070.00714.71
7.3.50.0060.00614.93
7.3.40.0080.00414.86
7.3.30.0070.00414.67
7.3.20.0050.00516.54
7.3.10.0070.00316.78
7.3.00.0030.01316.77
7.2.330.0130.01016.79
7.2.320.0160.00616.77
7.2.310.0100.00716.83
7.2.300.0100.00616.36
7.2.290.0060.01016.68
7.2.250.0090.00915.10
7.2.240.0000.02014.76
7.2.230.0090.00614.92
7.2.220.0060.00914.92
7.2.210.0070.01014.69
7.2.200.0090.00614.84
7.2.190.0000.01014.96
7.2.180.0050.00814.99
7.2.170.0000.01014.91
7.2.00.0030.01019.47
7.1.330.0040.00815.91
7.1.320.0030.00615.76
7.1.310.0040.01115.91
7.1.300.0060.00315.95
7.1.290.0080.00415.86
7.1.280.0030.01015.75
7.1.270.0070.00715.64
7.1.260.0000.01315.61
7.1.100.0000.01218.03
7.1.70.0000.00717.19
7.1.60.0030.01319.82
7.1.50.0030.02016.98
7.1.00.0030.03322.48
7.0.200.0000.00716.80
7.0.140.0030.07722.00
7.0.60.0030.08320.05
7.0.50.0130.06017.85
7.0.40.0070.06720.27
7.0.30.0200.04020.23
7.0.20.0430.06720.09
7.0.10.0030.08020.33
7.0.00.0100.05320.14
5.6.280.0030.07320.99
5.6.210.0030.08020.72
5.6.200.0000.04318.24
5.6.190.0000.07320.77
5.6.180.3400.04320.49
5.6.170.0200.05720.56
5.6.160.0070.09020.56
5.6.150.0100.07318.27
5.6.140.0070.08318.17
5.6.130.0230.06718.28
5.6.120.0070.05720.99
5.6.110.0130.07720.96
5.6.100.0270.05720.98
5.6.90.0070.08721.14
5.6.80.0130.07320.43
5.6.70.4270.04020.53
5.5.350.0000.08320.31
5.5.340.0130.05717.99
5.5.330.0170.07320.38
5.5.320.0200.03320.28
5.5.310.0230.05020.27
5.5.300.0170.07717.98
5.5.290.0000.08718.06
5.5.280.0130.05320.82
5.5.270.0030.04320.86
5.5.260.0070.08720.87
5.5.250.0070.08320.69
5.5.240.0100.04020.26
5.4.450.0400.05719.50
5.4.440.0200.06719.39
5.4.430.0270.03319.66
5.4.420.0270.03319.45
5.4.410.0200.04019.18
5.4.400.0200.04719.20
5.4.390.0270.05018.95
5.4.380.0270.04319.15
5.4.370.0270.03019.08
5.4.360.0270.04719.09
5.4.350.0270.04318.95
5.4.340.0270.04318.95
5.4.320.0300.06719.24
5.4.310.0170.04018.98
5.4.300.0170.04719.22
5.4.290.0200.03719.07
5.4.280.0230.03318.84
5.4.270.0230.03319.24
5.4.260.0270.03019.31
5.4.250.0230.03318.98
5.4.240.0230.04719.19
5.4.230.0200.04719.30
5.4.220.0230.04719.05
5.4.210.0230.04019.13
5.4.200.0270.03019.13
5.4.190.0230.04719.25
5.4.180.0200.04018.86
5.4.170.0300.03719.22
5.4.160.0200.06018.85
5.4.150.0230.04719.04
5.4.140.0200.03716.55
5.4.130.0230.04016.56
5.4.120.0200.03316.38
5.4.110.0270.04016.31
5.4.100.0200.03716.63
5.4.90.0230.04016.33
5.4.80.0230.03716.32
5.4.70.0200.04016.57
5.4.60.0300.06316.25
5.4.50.0200.04016.52
5.4.40.0170.04016.53
5.4.30.0170.04016.52
5.4.20.0200.03316.52
5.4.10.0270.03016.42
5.4.00.0130.04015.81
5.3.290.0230.04314.78
5.3.280.0130.04314.57
5.3.270.0230.04714.59
5.3.260.0200.06314.58
5.3.250.0300.05314.52
5.3.240.0170.04014.72
5.3.230.0200.04314.57
5.3.220.0230.05014.49
5.3.210.0230.03314.71
5.3.200.0270.03314.46
5.3.190.0200.03714.61
5.3.180.0270.07314.48
5.3.170.0130.04714.49
5.3.160.0230.03314.79
5.3.150.0170.04014.61
5.3.140.0230.03314.79
5.3.130.0300.03014.77
5.3.120.0230.03714.52
5.3.110.0170.04014.51
5.3.100.0200.05314.01
5.3.90.0200.03714.00
5.3.80.0270.03013.95
5.3.70.0270.06713.93
5.3.60.0170.04014.08
5.3.50.0230.03013.93
5.3.40.0230.04013.96
5.3.30.0100.04314.14
5.3.20.0300.05013.82
5.3.10.0200.04713.66
5.3.00.0300.04713.72
5.2.170.0230.06011.21
5.2.160.0170.06011.23
5.2.150.0200.05011.11
5.2.140.0200.03711.08
5.2.130.0130.03011.02
5.2.120.0170.06011.09
5.2.110.0170.04011.03
5.2.100.0130.04311.11
5.2.90.0170.03011.23
5.2.80.0230.04011.01
5.2.70.0200.02711.17
5.2.60.0170.03011.11
5.2.50.0130.04311.04
5.2.40.0100.03011.05
5.2.30.0130.03711.06
5.2.20.0130.02710.94
5.2.10.0170.03710.78
5.2.00.0200.05310.73
5.1.60.0170.0279.95
5.1.50.0100.0309.93
5.1.40.0170.0209.88
5.1.30.0130.02710.31
5.1.20.0130.03310.44
5.1.10.0100.03010.06
5.1.00.0170.05310.21
5.0.50.0070.0438.55
5.0.40.0070.0208.30
5.0.30.0070.0638.21
5.0.20.0070.0208.11
5.0.10.0130.0338.11
5.0.00.0100.0378.06
4.4.90.0070.0207.54
4.4.80.0070.0277.54
4.4.70.0070.0237.54
4.4.60.0070.0177.54
4.4.50.0030.0207.54
4.4.40.0100.0507.54
4.4.30.0030.0277.54
4.4.20.0070.0337.54
4.4.10.0070.0307.54
4.4.00.0070.0437.54
4.3.110.0130.0277.54
4.3.100.0070.0207.54
4.3.90.0130.0177.54
4.3.80.0070.0277.54
4.3.70.0100.0337.54
4.3.60.0170.0237.54
4.3.50.0130.0177.54
4.3.40.0100.0277.54
4.3.30.0030.0177.54
4.3.20.0000.0237.54
4.3.10.0030.0177.54
4.3.00.0030.0177.54

preferences:
40.83 ms | 400 KiB | 5 Q