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(35353, 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.0070.00718.27
8.3.50.0110.01121.16
8.3.40.0110.00418.67
8.3.30.0070.00719.18
8.3.20.0000.00720.29
8.3.10.0040.00423.69
8.3.00.0000.00819.50
8.2.180.0150.00016.38
8.2.170.0140.00022.96
8.2.160.0120.00320.57
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0000.00822.23
8.2.110.0040.00420.52
8.2.100.0000.01118.16
8.2.90.0050.00219.40
8.2.80.0060.00317.97
8.2.70.0040.00417.75
8.2.60.0040.00418.13
8.2.50.0030.00518.07
8.2.40.0060.00320.01
8.2.30.0040.00418.25
8.2.20.0000.00717.73
8.2.10.0060.00318.18
8.2.00.0070.00017.91
8.1.280.0060.01225.92
8.1.270.0050.00323.91
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0040.00424.04
8.1.230.0060.00619.11
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0100.00017.13
8.1.190.0040.00417.23
8.1.180.0080.00018.10
8.1.170.0000.00818.69
8.1.160.0040.00422.09
8.1.150.0000.00718.93
8.1.140.0080.00017.58
8.1.130.0000.00717.89
8.1.120.0000.00717.56
8.1.110.0030.00517.53
8.1.100.0050.00317.43
8.1.90.0000.00817.54
8.1.80.0040.00417.42
8.1.70.0000.00717.43
8.1.60.0000.00817.54
8.1.50.0000.00917.58
8.1.40.0050.00317.45
8.1.30.0050.00317.75
8.1.20.0000.00717.60
8.1.10.0050.00517.50
8.1.00.0000.00717.50
8.0.300.0030.00518.77
8.0.290.0050.00216.75
8.0.280.0030.00318.54
8.0.270.0030.00317.31
8.0.260.0000.00617.37
8.0.250.0070.00016.93
8.0.240.0000.00717.02
8.0.230.0030.00317.05
8.0.220.0030.00316.88
8.0.210.0000.00616.96
8.0.200.0070.00016.93
8.0.190.0000.00717.12
8.0.180.0000.00716.98
8.0.170.0040.00416.87
8.0.160.0040.00416.92
8.0.150.0000.00816.94
8.0.140.0000.00816.89
8.0.130.0000.00513.35
8.0.120.0040.00416.93
8.0.110.0050.00316.96
8.0.100.0050.00216.99
8.0.90.0000.00816.96
8.0.80.0060.00916.95
8.0.70.0040.00416.85
8.0.60.0000.00717.08
8.0.50.0040.00417.06
8.0.30.0090.01317.22
8.0.20.0080.01017.40
8.0.10.0040.00417.12
8.0.00.0080.01116.67
7.4.330.0030.00315.22
7.4.320.0060.00316.64
7.4.300.0070.00016.65
7.4.290.0020.00516.66
7.4.280.0040.00416.55
7.4.270.0000.00716.59
7.4.260.0030.00616.61
7.4.250.0040.00416.64
7.4.240.0020.00516.62
7.4.230.0070.00016.76
7.4.220.0070.01816.76
7.4.210.0170.00316.54
7.4.200.0000.00816.73
7.4.160.0100.00516.57
7.4.150.0080.01617.40
7.4.140.0060.01917.86
7.4.130.0050.01216.53
7.4.120.0100.01016.52
7.4.110.0170.00616.61
7.4.100.0130.00316.54
7.4.90.0140.00316.65
7.4.80.0060.01319.39
7.4.70.0180.00016.57
7.4.60.0060.01316.43
7.4.50.0000.00816.38
7.4.40.0160.00016.43
7.4.30.0100.01416.63
7.4.00.0040.01014.98
7.3.330.0000.00613.27
7.3.320.0050.00013.46
7.3.310.0000.00716.39
7.3.300.0030.00316.48
7.3.290.0040.01116.39
7.3.280.0110.00616.42
7.3.270.0150.00917.40
7.3.260.0100.00716.56
7.3.250.0170.00216.69
7.3.240.0140.00316.49
7.3.230.0130.00816.46
7.3.210.0060.01216.61
7.3.200.0160.00619.39
7.3.190.0030.01216.61
7.3.180.0120.00416.73
7.3.170.0120.00616.71
7.3.160.0120.00916.65
7.3.120.0110.00614.79
7.3.110.0040.01514.79
7.3.100.0060.00914.70
7.3.90.0120.00015.01
7.3.80.0030.01014.77
7.3.70.0030.00914.95
7.3.60.0070.01014.68
7.3.50.0090.00614.75
7.3.40.0050.00514.62
7.3.30.0080.00514.84
7.3.20.0080.00816.39
7.3.10.0070.00716.78
7.3.00.0040.01116.72
7.2.330.0070.01016.72
7.2.320.0060.01416.63
7.2.310.0110.00716.75
7.2.300.0090.00916.79
7.2.290.0080.01216.84
7.2.250.0030.01715.31
7.2.240.0100.01015.24
7.2.230.0030.00715.23
7.2.220.0000.00915.02
7.2.210.0030.00815.08
7.2.200.0080.00814.90
7.2.190.0100.00014.97
7.2.180.0090.00915.00
7.2.170.0060.00915.01
7.2.110.0000.01216.45
7.2.100.0090.00316.54
7.2.90.0090.00316.32
7.2.80.0040.01116.72
7.2.70.0040.00817.07
7.2.60.0060.00317.06
7.2.50.0070.01116.75
7.2.40.0110.00416.79
7.2.30.0110.00416.99
7.2.20.0000.01717.04
7.2.10.0100.00317.00
7.2.00.0100.00316.97
7.1.330.0000.01416.05
7.1.320.0000.00815.73
7.1.310.0000.01415.77
7.1.300.0030.01315.63
7.1.290.0090.00915.58
7.1.280.0070.00715.85
7.1.270.0080.00815.80
7.1.260.0030.00915.90
7.1.230.0120.00015.86
7.1.220.0060.00715.91
7.1.210.0070.00715.94
7.1.200.0000.01315.91
7.1.190.0040.01115.83
7.1.180.0000.01615.95
7.1.170.0000.01215.76
7.1.160.0040.01115.63
7.1.150.0060.00615.75
7.1.140.0140.00015.77
7.1.130.0070.00715.98
7.1.120.0090.00315.85
7.1.110.0090.00315.71
7.1.100.0090.00615.85
7.1.90.0030.01015.91
7.1.80.0030.01315.74
7.1.70.0040.00816.55
7.1.60.0060.01417.47
7.1.50.0110.00916.54
7.1.40.0070.01015.64
7.1.30.0080.00416.00
7.1.20.0070.01415.74
7.1.10.0060.00915.95
7.1.00.0070.04019.22
7.0.310.0090.00315.47
7.0.300.0000.00915.11
7.0.290.0060.00615.29
7.0.280.0100.00015.45
7.0.270.0060.00615.46
7.0.260.0000.01515.29
7.0.250.0130.00015.57
7.0.240.0030.00615.43
7.0.230.0040.00415.28
7.0.220.0060.00615.52
7.0.210.0060.00615.36
7.0.200.0090.00316.03
7.0.190.0040.00815.58
7.0.180.0090.00315.52
7.0.170.0070.00715.66
7.0.160.0090.00615.50
7.0.150.0070.00715.34
7.0.140.0030.04118.69
7.0.130.0090.00315.43
7.0.120.0000.01315.52
7.0.110.0100.00315.31
7.0.100.0030.00715.18
7.0.90.0060.00615.33
7.0.80.0100.00315.39
7.0.70.0070.00715.43
7.0.60.0100.04317.75
7.0.50.0050.02316.69
7.0.40.0130.02016.94
7.0.30.0190.04216.85
7.0.20.0150.02316.89
7.0.10.0150.03516.83
7.0.00.0070.04816.84
5.6.380.0080.00814.38
5.6.370.0040.00814.66
5.6.360.0130.00314.29
5.6.350.0030.01014.54
5.6.340.0040.01214.33
5.6.330.0000.00914.15
5.6.320.0030.00714.29
5.6.310.0040.01114.63
5.6.300.0050.00314.46
5.6.290.0100.00314.20
5.6.280.0030.04117.63
5.6.270.0070.00314.15
5.6.260.0040.01114.35
5.6.250.0100.00314.16
5.6.240.0060.00914.68
5.6.230.0100.00314.58
5.6.220.0060.00314.43
5.6.210.0050.02317.34
5.6.200.0060.02616.18
5.6.190.0090.02017.35
5.6.180.0150.04617.40
5.6.170.0110.02517.41
5.6.160.0080.04217.52
5.6.150.0080.02016.36
5.6.140.0050.02316.30
5.6.130.0140.02516.33
5.6.120.0040.02617.67
5.6.110.0110.03017.66
5.6.100.0070.03217.64
5.6.90.0090.04017.68
5.6.80.0050.04517.34
5.6.70.2230.02217.20
5.6.60.0070.00714.21
5.6.50.0050.00514.30
5.6.40.0080.00414.25
5.6.30.0090.00314.27
5.6.20.0090.00614.19
5.6.10.0090.00614.33
5.6.00.0070.00714.43
5.5.380.0040.00712.79
5.5.370.0060.00312.79
5.5.360.0000.00912.79
5.5.350.0070.04516.66
5.5.340.0050.02615.41
5.5.330.0020.04816.62
5.5.320.0260.03416.57
5.5.310.0120.03116.53
5.5.300.0050.02815.40
5.5.290.0000.02715.36
5.5.280.0120.04016.80
5.5.270.0100.02516.88
5.5.260.0080.03316.88
5.5.250.0100.04116.69
5.5.240.0130.04316.50
5.5.230.0000.01112.79
5.5.220.0050.00512.79
5.5.210.0040.00412.79
5.5.200.0030.00612.79
5.5.190.0040.00812.79
5.5.180.0000.01012.79
5.5.170.0040.01514.16
5.5.160.0000.00612.79
5.5.150.0070.00012.79
5.5.140.0060.00012.79
5.5.130.0030.00712.79
5.5.120.0070.00412.79
5.5.110.0060.00612.79
5.5.100.0000.00612.79
5.5.90.0000.00712.79
5.5.80.0040.00412.79
5.5.70.0030.00712.79
5.5.60.0040.00712.79
5.5.50.0000.01012.79
5.5.40.0000.00812.79
5.5.30.0030.00712.79
5.5.20.0090.00312.79
5.5.10.0030.00312.79
5.5.00.0110.00012.79
5.4.450.0490.02716.19
5.4.440.0430.03616.18
5.4.430.0420.04216.06
5.4.420.0450.03016.13
5.4.410.0470.03216.14
5.4.400.0340.03416.02
5.4.390.0450.03115.97
5.4.380.0130.02816.01
5.4.370.0330.03515.90
5.4.360.0110.03315.97
5.4.350.0250.03515.82
5.4.340.0090.02212.40
5.4.330.0090.00912.79
5.4.320.0100.02112.65
5.4.310.0080.02612.65
5.4.300.0090.02112.65
5.4.290.0090.02212.65
5.4.280.0110.02712.60
5.4.270.0070.02212.60
5.4.260.0080.02312.60
5.4.250.0080.02112.60
5.4.240.0040.02212.60
5.4.230.0090.02012.60
5.4.220.0090.02112.60
5.4.210.0050.02212.59
5.4.200.0090.02012.59
5.4.190.0080.02212.59
5.4.180.0090.01912.59
5.4.170.0060.02212.60
5.4.160.0080.02212.59
5.4.150.0090.01912.59
5.4.140.0090.02012.44
5.4.130.0090.01912.43
5.4.120.0040.02312.41
5.4.110.0090.01812.40
5.4.100.0080.01912.40
5.4.90.0070.02212.41
5.4.80.0060.02312.40
5.4.70.0060.02212.40
5.4.60.0070.02012.40
5.4.50.0100.01812.40
5.4.40.0060.02112.40
5.4.30.0080.02012.39
5.4.20.0090.01912.39
5.4.10.0040.02412.39
5.4.00.0080.02112.14
5.3.290.0060.02312.80
5.3.280.0060.02212.75
5.3.270.0060.02212.76
5.3.260.0090.02212.76
5.3.250.0060.02312.76
5.3.240.0080.02212.75
5.3.230.0050.02412.75
5.3.220.0040.02612.74
5.3.210.0120.02212.74
5.3.200.0080.03012.73
5.3.190.0070.02612.73
5.3.180.0070.03912.73
5.3.170.0070.02912.73
5.3.160.0030.03612.73
5.3.150.0070.03012.73
5.3.140.0120.03612.72
5.3.130.0130.04012.72
5.3.120.0120.02712.72
5.3.110.0130.05212.72
5.3.100.0130.04112.46
5.3.90.0160.07312.45
5.3.80.0070.02712.45
5.3.70.0070.03312.45
5.3.60.0190.04212.44
5.3.50.0120.02612.41
5.3.40.0060.02812.41
5.3.30.0020.03012.39
5.3.20.0050.02712.28
5.3.10.0130.02212.27
5.3.00.0170.07312.26
5.2.170.0020.02811.01
5.2.160.0090.02311.01
5.2.150.0070.02711.01
5.2.140.0070.02311.01
5.2.130.0100.03410.99
5.2.120.0100.02810.99
5.2.110.0090.02610.99
5.2.100.0070.02110.99
5.2.90.0060.02210.99
5.2.80.0070.01810.99
5.2.70.0100.02110.99
5.2.60.0060.02110.97
5.2.50.0060.02110.95
5.2.40.0070.01510.94
5.2.30.0060.02110.92
5.2.20.0040.02210.92
5.2.10.0060.01910.88
5.2.00.0050.01910.81
5.1.60.0060.01510.46
5.1.50.0070.01910.45
5.1.40.0050.01810.44
5.1.30.0060.01710.62
5.1.20.0020.03010.63
5.1.10.0080.03310.49
5.1.00.0050.02410.49
5.0.50.0070.0209.73
5.0.40.0070.0109.66
5.0.30.0050.0179.57
5.0.20.0050.0159.55
5.0.10.0040.0139.54
5.0.00.0060.0189.54
4.4.90.0040.0098.78
4.4.80.0050.0118.77
4.4.70.0020.0138.77
4.4.60.0050.0118.77
4.4.50.0020.0168.78
4.4.40.0070.0158.75
4.4.30.0020.0158.77
4.4.20.0030.0128.82
4.4.10.0020.0118.82
4.4.00.0030.0158.77
4.3.110.0030.0148.73
4.3.100.0030.0118.73
4.3.90.0050.0108.71
4.3.80.0030.0148.69
4.3.70.0020.0098.71
4.3.60.0040.0088.71
4.3.50.0020.0108.71
4.3.40.0020.0148.66
4.3.30.0060.0128.06
4.3.20.0020.0138.05
4.3.10.0020.0198.03
4.3.00.0070.0129.91

preferences:
46.76 ms | 400 KiB | 5 Q