3v4l.org

run code in 300+ PHP versions simultaneously
<?php function xtemplate_formatter_secToTime($rawSeconds, $useSec = false, $convertHoursToDays = false) { $allSeconds = abs($rawSeconds); $days = floor($allSeconds / 86400); $hoursSeconds = $allSeconds - 86400 * $days; $hours = floor($hoursSeconds / 3600); $minutesSeconds = $hoursSeconds - 3600 * $hours; $minutes = floor($minutesSeconds / 60); if ($useSec) { $seconds = $minutesSeconds - 60 * $minutes; } if (!$convertHoursToDays) { $hours = $days * 24 + $hours; $days = 0; } if ($hours < 10) { $hours = "0" . $hours; } if ($minutes < 10) { $minutes = "0" . $minutes; } if ($useSec && $seconds < 10) { $seconds = "0" . $seconds; } $str = ''; if ($days > 0) { $str .= $days . 'd'; } $str = $str . $hours . ":" . $minutes; if ($useSec) { $str .= ":" . $seconds; } return $str; } echo xtemplate_formatter_secToTime(35343, true);

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.0120.00918.38
8.3.50.0140.00721.12
8.3.40.0070.00718.75
8.3.30.0070.00719.07
8.3.20.0040.00420.26
8.3.10.0040.00423.70
8.3.00.0060.00319.26
8.2.180.0110.00416.74
8.2.170.0140.00022.96
8.2.160.0070.00720.25
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0080.00020.81
8.2.110.0090.00020.52
8.2.100.0110.00018.34
8.2.90.0040.00419.22
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0030.00617.92
8.2.50.0060.00318.07
8.2.40.0050.00320.19
8.2.30.0040.00418.11
8.2.20.0040.00417.92
8.2.10.0030.00518.19
8.2.00.0000.00717.88
8.1.280.0110.00725.92
8.1.270.0040.00423.91
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0030.00623.96
8.1.230.0040.00818.98
8.1.220.0030.00617.78
8.1.210.0030.00618.77
8.1.200.0060.00317.25
8.1.190.0000.00817.13
8.1.180.0080.00018.10
8.1.170.0060.00318.63
8.1.160.0070.00022.07
8.1.150.0000.00718.82
8.1.140.0000.00717.51
8.1.130.0030.00517.74
8.1.120.0000.00817.42
8.1.110.0000.00817.49
8.1.100.0040.00417.48
8.1.90.0030.00517.56
8.1.80.0050.00217.41
8.1.70.0000.00717.48
8.1.60.0040.00417.52
8.1.50.0040.00417.61
8.1.40.0050.00217.45
8.1.30.0080.00017.63
8.1.20.0020.00517.61
8.1.10.0000.00817.56
8.1.00.0030.00517.38
8.0.300.0020.00518.77
8.0.290.0040.00416.75
8.0.280.0030.00518.47
8.0.270.0000.00717.38
8.0.260.0000.00617.32
8.0.250.0070.00017.00
8.0.240.0070.00017.06
8.0.230.0030.00416.98
8.0.220.0050.00217.00
8.0.210.0000.00716.84
8.0.200.0030.00316.91
8.0.190.0000.00716.94
8.0.180.0040.00417.04
8.0.170.0070.00016.92
8.0.160.0000.00716.96
8.0.150.0000.00816.84
8.0.140.0000.00716.80
8.0.130.0000.00513.46
8.0.120.0040.00416.94
8.0.110.0040.00416.95
8.0.100.0000.00716.83
8.0.90.0070.00016.84
8.0.80.0080.00816.91
8.0.70.0060.00317.03
8.0.60.0040.00416.87
8.0.50.0000.00716.84
8.0.30.0100.01117.26
8.0.20.0110.00817.40
8.0.10.0040.00417.14
8.0.00.0130.00516.95
7.4.330.0000.00515.19
7.4.320.0060.00316.57
7.4.300.0030.00316.48
7.4.290.0030.00316.65
7.4.280.0030.00616.55
7.4.270.0030.00316.59
7.4.260.0080.00316.63
7.4.250.0000.00716.62
7.4.240.0050.00216.67
7.4.230.0070.00016.78
7.4.220.0170.00316.52
7.4.210.0070.01416.53
7.4.200.0040.00416.46
7.4.160.0140.00316.68
7.4.150.0120.00817.40
7.4.140.0130.00617.86
7.4.130.0100.00716.56
7.4.120.0090.00916.71
7.4.110.0070.01516.53
7.4.100.0060.01016.64
7.4.90.0140.00516.41
7.4.80.0100.00719.39
7.4.70.0060.01216.61
7.4.60.0000.01716.61
7.4.50.0000.00916.58
7.4.40.0040.01216.49
7.4.30.0130.00916.71
7.4.00.0100.00314.74
7.3.330.0000.00613.51
7.3.320.0000.00613.45
7.3.310.0030.00316.43
7.3.300.0000.00716.40
7.3.290.0080.00916.41
7.3.280.0080.01016.41
7.3.270.0140.00417.40
7.3.260.0030.01616.61
7.3.250.0120.00816.60
7.3.240.0140.00816.69
7.3.230.0100.00716.62
7.3.210.0090.01216.43
7.3.200.0130.01019.39
7.3.190.0150.00016.61
7.3.180.0080.00816.40
7.3.170.0000.01716.64
7.3.160.0080.00816.41
7.2.330.0100.01016.76
7.2.320.0060.01216.64
7.2.310.0070.01616.80
7.2.300.0070.01016.79
7.2.290.0090.01316.70
7.2.00.0000.01319.45
7.1.100.0000.00918.17
7.1.70.0000.01317.20
7.1.60.0090.01619.11
7.1.50.0130.01017.07
7.1.00.0030.07722.30
7.0.200.0040.00416.82
7.0.140.0070.07022.01
7.0.60.0100.06719.95
7.0.50.0030.05317.94
7.0.40.0170.07720.15
7.0.30.0670.06020.23
7.0.20.0230.04720.06
7.0.10.0030.09320.30
7.0.00.0000.08020.22
5.6.280.0030.07021.05
5.6.210.0100.07320.61
5.6.200.0070.04718.15
5.6.190.0100.04320.50
5.6.180.0300.06320.48
5.6.170.0200.04720.57
5.6.160.0100.03320.57
5.6.150.0100.04718.14
5.6.140.0030.07018.28
5.6.130.0230.07018.15
5.6.120.0130.07721.04
5.6.110.0100.08021.11
5.6.100.0100.04021.02
5.6.90.0100.08020.89
5.6.80.0100.04720.40
5.6.70.4270.04020.41
5.5.350.0100.06720.45
5.5.340.0100.07718.05
5.5.330.0100.06020.31
5.5.320.0330.08020.34
5.5.310.0230.08320.51
5.5.300.0070.08018.02
5.5.290.0030.07717.93
5.5.280.0070.08720.89
5.5.270.0030.05320.69
5.5.260.0030.04320.86
5.5.250.0030.08020.79
5.5.240.0300.06020.08
5.4.450.0670.05719.39
5.4.440.0830.06319.19
5.4.430.0730.06319.69
5.4.420.1000.08019.63
5.4.410.0730.06319.46
5.4.400.0770.05019.38
5.4.390.0100.05319.15
5.4.380.0730.06319.15
5.4.370.0270.05319.38
5.4.360.0900.03319.38
5.4.350.0730.05319.21
5.4.340.0040.03712.02
5.4.320.0090.03412.51
5.4.310.0030.04512.51
5.4.300.0050.03812.52
5.4.290.0060.03712.51
5.4.280.0080.03312.41
5.4.270.0050.04212.41
5.4.260.0110.04512.41
5.4.250.0090.05012.41
5.4.240.0100.04912.40
5.4.230.0080.04112.39
5.4.220.0060.04112.40
5.4.210.0130.06312.39
5.4.200.0070.04612.40
5.4.190.0080.04712.39
5.4.180.0120.05312.39
5.4.170.0240.06112.40
5.4.160.0130.05612.40
5.4.150.0160.05312.39
5.4.140.0160.07412.08
5.4.130.0250.07212.06
5.4.120.0140.09612.02
5.4.110.0100.06312.02
5.4.100.0100.05612.02
5.4.90.0090.03912.02
5.4.80.0080.03912.02
5.4.70.0060.04612.02
5.4.60.0080.03412.02
5.4.50.0050.04612.02
5.4.40.0040.03612.00
5.4.30.0070.03512.00
5.4.20.0060.03512.00
5.4.10.0060.03412.00
5.4.00.0080.03311.49
5.3.290.0100.03812.80
5.3.280.0120.04212.71
5.3.270.0020.05812.72
5.3.260.0060.04712.71
5.3.250.0090.05312.72
5.3.240.0060.05012.72
5.3.230.0090.04312.70
5.3.220.0060.04212.68
5.3.210.0100.03712.68
5.3.200.0080.04412.68
5.3.190.0070.05012.68
5.3.180.0100.03612.67
5.3.170.0100.03912.66
5.3.160.0120.04212.67
5.3.150.0060.03612.67
5.3.140.0050.03812.66
5.3.130.0040.04012.66
5.3.120.0070.04312.66
5.3.110.0040.04112.66
5.3.100.0030.04112.13
5.3.90.0020.04212.12
5.3.80.0060.04412.11
5.3.70.0060.05012.11
5.3.60.0070.03912.09
5.3.50.0050.03812.04
5.3.40.0060.03612.04
5.3.30.0040.04212.00
5.3.20.0090.03111.78
5.3.10.0060.03411.74
5.3.00.0070.04711.73
5.2.170.0070.0339.24
5.2.160.0020.0339.23
5.2.150.0060.0319.23
5.2.140.0070.0369.23
5.2.130.0060.0309.20
5.2.120.0060.0319.19
5.2.110.0070.0289.20
5.2.100.0060.0349.19
5.2.90.0060.0289.19
5.2.80.0060.0399.19
5.2.70.0090.0409.18
5.2.60.0090.0389.14
5.2.50.0040.0399.12
5.2.40.0040.0319.09
5.2.30.0100.0389.06
5.2.20.0070.0329.05
5.2.10.0070.0298.96
5.2.00.0060.0348.84
5.1.60.0060.0338.12
5.1.50.0070.0268.11
5.1.40.0100.0228.10
5.1.30.0080.0258.44
5.1.20.0050.0308.47
5.1.10.0040.0278.19
5.1.00.0090.0338.19
5.0.50.0030.0246.68
5.0.40.0070.0186.54
5.0.30.0050.0346.34
5.0.20.0040.0216.32
5.0.10.0030.0226.29
5.0.00.0030.0316.29
4.4.90.0040.0164.78
4.4.80.0030.0164.75
4.4.70.0010.0184.75
4.4.60.0040.0194.75
4.4.50.0040.0174.77
4.4.40.0040.0264.71
4.4.30.0020.0174.76
4.4.20.0040.0154.85
4.4.10.0020.0164.85
4.4.00.0040.0254.76
4.3.110.0020.0164.66
4.3.100.0050.0204.67
4.3.90.0040.0204.64
4.3.80.0050.0304.58
4.3.70.0050.0154.63
4.3.60.0040.0134.63
4.3.50.0060.0134.63
4.3.40.0000.0274.54
4.3.30.0030.0153.34
4.3.20.0020.0193.32
4.3.10.0020.0153.28
4.3.00.0100.0237.04

preferences:
49.73 ms | 401 KiB | 5 Q