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 = '16:05:12'; $evening = '18: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.0070.01118.96
8.3.30.0120.00318.92
8.3.20.0150.00020.38
8.3.10.0040.00422.08
8.3.00.0080.00022.58
8.2.170.0120.00919.06
8.2.160.0100.00322.96
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0110.00726.16
8.2.120.0050.00319.61
8.2.110.0060.00322.27
8.2.100.0040.00719.76
8.2.90.0040.00419.36
8.2.80.0000.00818.05
8.2.70.0060.00317.75
8.2.60.0090.00318.18
8.2.50.0040.00418.07
8.2.40.0040.00420.01
8.2.30.0040.00418.14
8.2.20.0040.00417.75
8.2.10.0000.00717.87
8.2.00.0030.00517.74
8.1.270.0150.00022.19
8.1.260.0060.00326.35
8.1.250.0070.00728.09
8.1.240.0000.00823.89
8.1.230.0080.00319.28
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0030.00717.36
8.1.190.0040.00417.40
8.1.180.0040.00418.75
8.1.170.0000.00918.49
8.1.160.0020.00522.07
8.1.150.0040.00418.57
8.1.140.0000.00717.43
8.1.130.0030.00317.98
8.1.120.0000.00717.45
8.1.110.0000.00817.40
8.1.100.0000.00717.33
8.1.90.0040.00417.44
8.1.80.0040.00417.41
8.1.70.0000.00717.38
8.1.60.0060.00317.62
8.1.50.0070.00017.57
8.1.40.0050.00217.55
8.1.30.0000.00817.52
8.1.20.0000.00817.73
8.1.10.0040.00417.59
8.1.00.0030.00517.55
8.0.300.0000.00718.77
8.0.290.0080.00017.05
8.0.280.0040.00418.50
8.0.270.0030.00317.31
8.0.260.0030.00316.96
8.0.250.0080.00016.97
8.0.240.0000.00717.11
8.0.230.0050.00316.95
8.0.220.0070.00016.90
8.0.210.0040.00417.03
8.0.200.0030.00317.07
8.0.190.0050.00316.95
8.0.180.0000.00716.84
8.0.170.0040.00416.99
8.0.160.0050.00316.99
8.0.150.0040.00416.91
8.0.140.0030.00316.73
8.0.130.0000.00613.38
8.0.120.0050.00316.87
8.0.110.0040.00416.99
8.0.100.0070.00016.98
8.0.90.0000.00917.04
8.0.80.0090.00617.00
8.0.70.0080.00016.74
8.0.60.0070.00016.86
8.0.50.0040.00416.94
8.0.30.0140.00317.26
8.0.20.0130.00517.40
8.0.10.0000.00717.16
8.0.00.0100.00916.68
7.4.330.0000.00615.00
7.4.320.0030.00316.60
7.4.300.0000.00616.55
7.4.290.0030.00316.53
7.4.280.0000.00716.68
7.4.270.0030.00316.46
7.4.260.0030.00316.55
7.4.250.0050.00216.48
7.4.240.0030.00316.59
7.4.230.0030.00316.77
7.4.220.0070.01016.58
7.4.210.0060.00816.57
7.4.200.0030.00316.46
7.4.190.0040.00416.79
7.4.160.0000.01516.69
7.4.150.0130.01017.40
7.4.140.0060.01417.86
7.4.130.0070.01016.67
7.4.120.0090.00816.58
7.4.110.0080.00816.70
7.4.100.0120.00616.68
7.4.90.0140.00316.48
7.4.80.0090.00919.39
7.4.70.0030.01416.50
7.4.60.0120.00416.54
7.4.50.0000.00816.35
7.4.40.0040.01122.77
7.4.30.0060.01016.46
7.4.00.0070.00715.02
7.3.330.0000.00513.29
7.3.320.0050.00013.46
7.3.310.0030.00316.48
7.3.300.0030.00316.45
7.3.290.0030.01116.43
7.3.280.0080.01116.46
7.3.270.0060.01017.40
7.3.260.0130.00416.66
7.3.250.0160.00316.68
7.3.240.0000.01716.48
7.3.230.0160.00716.46
7.3.210.0110.00716.55
7.3.200.0040.01219.39
7.3.190.0120.01016.54
7.3.180.0000.01516.42
7.3.170.0120.00616.70
7.3.160.0140.00316.60
7.3.120.0070.00715.02
7.3.10.0040.00816.68
7.3.00.0030.01016.48
7.2.330.0030.01616.52
7.2.320.0110.01716.80
7.2.310.0130.00316.64
7.2.300.0080.00816.68
7.2.290.0090.00916.65
7.2.130.0100.00016.81
7.2.120.0000.01016.83
7.2.110.0070.00416.78
7.2.100.0030.00917.02
7.2.90.0080.00416.69
7.2.80.0110.00316.70
7.2.70.0110.00316.79
7.2.60.0040.01116.81
7.2.50.0030.00916.71
7.2.40.0000.01016.80
7.2.30.0040.00816.96
7.2.20.0090.00616.90
7.2.10.0070.00716.95
7.2.00.0030.00917.93
7.1.250.0040.01115.68
7.1.100.0000.00917.91
7.1.70.0030.00517.15
7.1.60.0150.00919.82
7.1.50.0090.00617.11
7.1.00.0000.06022.45
7.0.200.0000.01016.70
7.0.140.0030.07022.04
7.0.60.0100.06319.93
7.0.50.0130.06717.85
7.0.40.0070.09320.27
7.0.30.0400.06020.24
7.0.20.0130.05020.15
7.0.10.0070.06020.20
7.0.00.0100.08020.20
5.6.280.0100.06721.03
5.6.210.0100.08020.48
5.6.200.0030.07318.22
5.6.190.0030.04720.60
5.6.180.0300.04020.62
5.6.170.0400.04320.48
5.6.160.0070.08320.55
5.6.150.0070.06318.22
5.6.140.0070.07718.11
5.6.130.0070.04018.16
5.6.120.0100.03721.09
5.6.110.0000.04321.02
5.6.100.0030.04720.99
5.6.90.0100.08321.13
5.6.80.0100.05320.51
5.5.350.0300.07020.39
5.5.340.0070.05317.97
5.5.330.0130.06720.40
5.5.320.0030.04720.28
5.5.310.0330.04720.51
5.5.300.0070.06717.92
5.5.290.0070.08317.93
5.5.280.0030.08720.69
5.5.270.0030.09020.66
5.5.260.0030.07320.80
5.5.250.0030.04020.70
5.5.240.0230.07320.20
5.4.450.0500.04019.29
5.4.440.0870.03319.20
5.4.430.0170.02719.54
5.4.420.0470.03719.38
5.4.410.0900.06019.06
5.4.400.0530.04719.25
5.4.390.1000.04018.87
5.4.380.0330.06018.79
5.4.370.0530.06718.73
5.4.360.0430.04318.53
5.4.350.0400.04718.59
5.4.340.0430.04718.78
5.4.320.0080.03312.50
5.4.310.0040.04012.50
5.4.300.0030.05112.50
5.4.290.0050.03812.50
5.4.280.0060.04212.39
5.4.270.0080.04412.39
5.4.260.0070.06318.88
5.4.250.0030.06018.70
5.4.240.0070.05319.05
5.4.230.0230.07018.97
5.4.220.0030.06318.86
5.4.210.0070.07718.93
5.4.200.0030.06318.70
5.4.190.0130.07018.89
5.4.180.0170.05318.97
5.4.170.0130.07018.88
5.4.160.0170.04718.58
5.4.150.0170.05318.93
5.4.140.0130.04716.34
5.4.130.0170.04316.37
5.4.120.0070.06016.60
5.4.110.0030.07716.63
5.4.100.0030.05316.47
5.4.90.0170.04716.67
5.4.80.0100.06716.35
5.4.70.0070.06716.49
5.4.60.0270.06316.49
5.4.50.0230.05316.31
5.4.40.0100.07016.66
5.4.30.0100.05316.33
5.4.20.0030.06316.39
5.4.10.0070.08016.49
5.4.00.0100.05315.93
5.3.290.0050.04012.80
5.3.280.0170.04314.61
5.3.270.0100.07314.63
5.3.260.0100.06714.59
5.3.250.0100.07014.78
5.3.240.0200.06014.61
5.3.230.0100.05714.68
5.3.220.0100.06314.73
5.3.210.0170.05014.77
5.3.200.0000.07714.65
5.3.190.0070.06714.65
5.3.180.0100.06314.64
5.3.170.0170.04714.64
5.3.160.0100.07014.64
5.3.150.0070.07714.64
5.3.140.0070.06014.57
5.3.130.0030.07014.62
5.3.120.0130.05314.52
5.3.110.0130.05014.42
5.3.100.0000.06314.13
5.3.90.0100.07314.08
5.3.80.0130.04313.99
5.3.70.0200.04714.10
5.3.60.0230.05014.07
5.3.50.0100.05013.97
5.3.40.0130.07014.13
5.3.30.0130.06713.89
5.3.20.0130.04313.53
5.3.10.0070.05013.50
5.3.00.0130.06713.62
5.2.170.0070.05711.24
5.2.160.0100.05711.33
5.2.150.0230.05011.23
5.2.140.0100.06011.31
5.2.130.0030.04311.27
5.2.120.0070.05711.06
5.2.110.0030.04311.01
5.2.100.0100.03711.11
5.2.90.0100.05711.19
5.2.80.0030.05311.18
5.2.70.0070.06011.27
5.2.60.0070.06011.15
5.2.50.0130.05311.03
5.2.40.0100.05010.97
5.2.30.0030.04711.04
5.2.20.0030.04311.18
5.2.10.0100.04310.76
5.2.00.0100.05010.89
5.1.60.0100.04310.16
5.1.50.0100.03010.10
5.1.40.0000.04310.14
5.1.30.0100.04710.32
5.1.20.0070.05010.32
5.1.10.0070.05010.08
5.1.00.0070.03710.16
5.0.50.0070.0338.54
5.0.40.0030.0308.36
5.0.30.0070.0408.29
5.0.20.0030.0278.24
5.0.10.0100.0278.09
5.0.00.0030.0508.31
4.4.90.0070.0207.20
4.4.80.0000.0337.20
4.4.70.0070.0207.20
4.4.60.0030.0277.20
4.4.50.0030.0207.20
4.4.40.0100.0307.17
4.4.30.0000.0307.12
4.4.20.0070.0177.02
4.4.10.0030.0206.52
4.4.00.0030.0475.95
4.3.110.0030.0205.95
4.3.100.0000.0235.95
4.3.90.0000.0235.95
4.3.80.0100.0375.95
4.3.70.0000.0235.95
4.3.60.0030.0305.95
4.3.50.0130.0205.95
4.3.40.0030.0405.95
4.3.30.0030.0205.95
4.3.20.0100.0175.95
4.3.10.0070.0175.95
4.3.00.0330.01313.16

preferences:
40.55 ms | 400 KiB | 5 Q