3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Converts a 'decimal time' in the format 1.5hours to DateInterval object * * @param Int $decimalTime * @return DateInterval */ function decTimeToInterval($decimalTime) { $hours = floor($decimalTime); $decimalTime -= $hours; $minutes = floor($decimalTime * 60); $decimalTime -= ($minutes/60); $seconds = floor($decimalTime * 3600); $interval = new \DateInterval("PT{$hours}H{$minutes}M{$seconds}S"); return $interval; } echo decTimeToInterval(1.6890000)->format("%H:%I");

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.01018.15
8.3.50.0130.00922.02
8.3.40.0140.00319.00
8.3.30.0100.00318.94
8.3.20.0050.00320.37
8.3.10.0040.00423.60
8.3.00.0080.00019.50
8.2.180.0150.00018.43
8.2.170.0140.00722.96
8.2.160.0110.00320.46
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0060.00326.16
8.2.120.0070.00322.25
8.2.110.0060.00322.29
8.2.100.0060.00619.57
8.2.90.0070.00019.30
8.2.80.0000.00817.97
8.2.70.0000.00817.63
8.2.60.0000.00818.05
8.2.50.0040.00418.07
8.2.40.0090.00020.05
8.2.30.0000.00718.14
8.2.20.0040.00417.77
8.2.10.0070.00018.19
8.2.00.0050.00317.86
8.1.280.0150.00325.92
8.1.270.0050.00322.24
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0090.00023.83
8.1.230.0090.00319.07
8.1.220.0000.00817.79
8.1.210.0050.00318.77
8.1.200.0040.00417.35
8.1.190.0040.00417.35
8.1.180.0080.00018.10
8.1.170.0050.00318.63
8.1.160.0000.00722.11
8.1.150.0070.00018.92
8.1.140.0030.00617.51
8.1.130.0000.00717.85
8.1.120.0070.00017.48
8.1.110.0000.00817.40
8.1.100.0000.00717.44
8.1.90.0040.00417.39
8.1.80.0030.00317.52
8.1.70.0030.00317.46
8.1.60.0050.00317.64
8.1.50.0060.00317.57
8.1.40.0040.00417.61
8.1.30.0040.00417.55
8.1.20.0000.00917.63
8.1.10.0000.00817.54
8.1.00.0040.00417.58
8.0.300.0030.00518.77
8.0.290.0040.00416.75
8.0.280.0070.00018.55
8.0.270.0030.00317.32
8.0.260.0040.00417.32
8.0.250.0000.00817.08
8.0.240.0000.00717.06
8.0.230.0000.00716.96
8.0.220.0040.00416.84
8.0.210.0000.00616.97
8.0.200.0030.00616.90
8.0.190.0000.00816.95
8.0.180.0040.00416.94
8.0.170.0000.00816.91
8.0.160.0070.00017.02
8.0.150.0000.00717.00
8.0.140.0050.00216.82
8.0.130.0050.00013.37
8.0.120.0040.00416.98
8.0.110.0040.00416.98
8.0.100.0040.00416.97
8.0.90.0020.00516.91
8.0.80.0060.01216.91
8.0.70.0000.00716.78
8.0.60.0050.00216.84
8.0.50.0000.00717.02
8.0.30.0090.00917.18
8.0.20.0160.00317.40
8.0.10.0050.00316.88
8.0.00.0150.00616.70
7.4.330.0050.00015.02
7.4.320.0030.00316.51
7.4.300.0000.00616.66
7.4.290.0000.00716.64
7.4.280.0050.00216.44
7.4.270.0030.00616.58
7.4.260.0030.00316.70
7.4.250.0070.00016.54
7.4.240.0040.00416.61
7.4.230.0070.00016.76
7.4.220.0090.00916.56
7.4.210.0090.00916.61
7.4.200.0070.00016.76
7.4.160.0070.01416.53
7.4.150.0100.00717.40
7.4.140.0110.01117.86
7.4.130.0070.01216.60
7.4.120.0130.00316.53
7.4.110.0070.01016.44
7.4.100.0070.01016.71
7.4.90.0100.00716.40
7.4.80.0100.00719.39
7.4.70.0070.01016.56
7.4.60.0140.00316.41
7.4.50.0040.00416.73
7.4.40.0110.01116.62
7.4.30.0070.01016.64
7.4.00.0060.01014.83
7.3.330.0000.00713.45
7.3.320.0030.00313.40
7.3.310.0070.00016.29
7.3.300.0000.00716.34
7.3.290.0060.00816.38
7.3.280.0090.00716.45
7.3.270.0030.01417.40
7.3.260.0090.01016.50
7.3.250.0070.01016.49
7.3.240.0130.00316.74
7.3.230.0110.00616.66
7.3.210.0100.00616.50
7.3.200.0160.00619.39
7.3.190.0160.00616.44
7.3.180.0030.01316.48
7.3.170.0170.00016.61
7.3.160.0100.01016.42
7.3.120.0100.00615.16
7.3.110.0030.01714.71
7.3.100.0080.00814.92
7.3.90.0100.00715.00
7.3.80.0030.01214.84
7.3.70.0050.00514.91
7.3.60.0000.01714.56
7.3.50.0030.01014.84
7.3.40.0100.00714.98
7.3.30.0070.00314.89
7.3.20.0060.00316.77
7.3.10.0080.00416.69
7.3.00.0100.00716.70
7.2.330.0070.01016.41
7.2.320.0140.00716.54
7.2.310.0110.00816.43
7.2.300.0070.01016.71
7.2.290.0190.03116.57
7.2.250.0070.01315.04
7.2.240.0080.01114.91
7.2.230.0090.00614.94
7.2.220.0060.01215.22
7.2.210.0060.01015.28
7.2.200.0030.01014.97
7.2.190.0090.00614.71
7.2.180.0000.01015.02
7.2.170.0100.00314.87
7.2.00.0080.00419.41
7.1.330.0000.01515.88
7.1.320.0000.01315.90
7.1.310.0060.00615.86
7.1.300.0030.00915.75
7.1.290.0090.00615.88
7.1.280.0040.00415.86
7.1.270.0000.01315.92
7.1.260.0030.01015.46
7.1.100.0000.01117.73
7.1.70.0070.00017.20
7.1.60.0200.00319.11
7.1.50.0030.02117.09
7.1.00.0100.06322.44
7.0.200.0000.00816.95
7.0.140.0030.07322.05
7.0.60.0070.06319.81
7.0.50.0000.04717.87
7.0.40.0070.09020.18
7.0.30.0430.06720.21
7.0.20.0230.08320.24
7.0.10.0300.04720.23
7.0.00.0100.07720.06
5.6.280.0030.07320.89
5.6.210.0030.08320.75
5.6.200.0030.05018.28
5.6.190.0070.07320.63
5.6.180.3230.04720.41
5.6.170.0270.04320.55
5.6.160.0070.03720.54
5.6.150.0130.06718.24
5.6.140.0000.05018.26
5.6.130.0070.08718.12
5.6.120.0070.08321.12
5.6.110.0030.05721.02
5.6.100.0070.07021.13
5.6.90.0130.08020.88
5.6.80.0100.07320.52
5.6.70.4400.04320.40
5.5.350.0230.05020.33
5.5.340.0000.04317.96
5.5.330.0130.07720.28
5.5.320.0200.04320.34
5.5.310.0270.04320.27
5.5.300.0070.07718.04
5.5.290.0100.05317.98
5.5.280.0030.08720.98
5.5.270.0130.04720.79
5.5.260.0170.07320.89
5.5.250.0200.05720.63
5.5.240.0100.08320.29
5.4.450.1630.04019.55
5.4.440.0600.05719.53
5.4.430.0830.04719.21
5.4.420.0870.00019.36
5.4.410.0630.00019.42
5.4.400.0600.00019.13
5.4.390.0670.00019.16
5.4.380.0630.00019.12
5.4.370.0670.00019.11
5.4.360.0600.00019.16
5.4.350.0670.00019.21
5.4.340.0080.03112.02
5.4.320.0060.03512.50
5.4.310.0070.03612.50
5.4.300.0070.03512.50
5.4.290.0040.03812.50
5.4.280.0090.04212.40
5.4.270.0010.04012.40
5.4.260.0030.03812.39
5.4.250.0080.03312.40
5.4.240.0080.04112.40
5.4.230.0060.03812.39
5.4.220.0060.03712.39
5.4.210.0060.03512.39
5.4.200.0070.03812.39
5.4.190.0060.03612.39
5.4.180.0060.03512.39
5.4.170.0030.03912.39
5.4.160.0040.03712.39
5.4.150.0050.03612.39
5.4.140.0020.04112.07
5.4.130.0100.03312.05
5.4.120.0050.03812.02
5.4.110.0070.03812.01
5.4.100.0080.03412.01
5.4.90.0050.03812.01
5.4.80.0060.03912.01
5.4.70.0120.03212.01
5.4.60.0050.03412.01
5.4.50.0050.03512.01
5.4.40.0030.03712.00
5.4.30.0040.03612.00
5.4.20.0040.03711.99
5.4.10.0060.03311.99
5.4.00.0070.03411.49
5.3.290.0070.03812.80
5.3.280.0050.03912.71
5.3.270.0060.03912.72
5.3.260.0060.03912.72
5.3.250.0020.04012.72
5.3.240.0070.03512.71
5.3.230.0060.03712.71
5.3.220.0030.04012.68
5.3.210.0070.03812.68
5.3.200.0040.03812.68
5.3.190.0060.03712.68
5.3.180.0060.03612.67
5.3.170.0050.03912.67
5.3.160.0050.03712.67
5.3.150.0060.03712.67
5.3.140.0060.03612.66
5.3.130.0070.03812.66
5.3.120.0110.03312.66
5.3.110.0060.03812.66
5.3.100.0050.03812.13
5.3.90.0060.03512.11
5.3.80.0080.03412.11
5.3.70.0060.03612.11
5.3.60.0040.04212.09
5.3.50.0080.04012.03
5.3.40.0070.04112.03
5.3.30.0070.03511.99
5.3.20.0050.03711.78
5.3.10.0050.03711.74
5.3.00.0060.03511.73
5.2.170.0040.0319.21
5.2.160.0040.0309.21
5.2.150.0040.0319.21
5.2.140.0030.0329.21
5.2.130.0050.0289.17
5.2.120.0040.0299.17
5.2.110.0040.0309.18
5.2.100.0040.0299.18
5.2.90.0080.0259.18
5.2.80.0070.0309.17
5.2.70.0020.0329.18
5.2.60.0040.0299.13
5.2.50.0040.0309.10
5.2.40.0040.0299.07
5.2.30.0050.0299.05
5.2.20.0080.0289.04
5.2.10.0030.0308.94
5.2.00.0080.0328.81
5.1.60.0050.0238.09
5.1.50.0030.0318.09
5.1.40.0080.0198.07
5.1.30.0060.0258.42
5.1.20.0050.0258.44
5.1.10.0070.0258.17
5.1.00.0040.0298.17
5.0.50.0030.0206.64
5.0.40.0030.0196.50
5.0.30.0040.0306.32
5.0.20.0070.0196.30
5.0.10.0040.0186.29
5.0.00.0020.0316.28
4.4.90.0020.0164.78
4.4.80.0060.0124.75
4.4.70.0030.0154.75
4.4.60.0030.0144.75
4.4.50.0040.0134.77
4.4.40.0040.0284.71
4.4.30.0040.0184.76
4.4.20.0030.0174.84
4.4.10.0030.0154.85
4.4.00.0020.0254.76
4.3.110.0020.0164.67
4.3.100.0040.0144.66
4.3.90.0000.0174.64
4.3.80.0010.0254.59
4.3.70.0020.0154.63
4.3.60.0010.0164.63
4.3.50.0030.0144.63
4.3.40.0030.0234.54
4.3.30.0030.0153.34
4.3.20.0060.0143.32
4.3.10.0010.0173.27
4.3.00.0230.01312.27

preferences:
43.58 ms | 401 KiB | 5 Q