3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numbers = array( 1234, 1234.0, 1234.05, 1234.005, 1234.5, 1234.50, 1234.55, 1234.505, 1234.555, 1234.5000, 1234.5500, 1234.5550, 1234.5555, 3, 3.0, 3.05, 3.5, 3.50, 3.55, 3.550, 3.555, 3.5550, 3.5555, 5.49, 5.255, 5.249, 5.244, 2.245, ); function format_to_komma_ruggit($number) { $number = round($number, 2); $number = number_format($number, strlen(substr(strrchr($number, "."), 1)), ',', '.'); return $number; } foreach ($numbers as $number) { echo $number . ' => ' . format_to_komma_ruggit($number); echo "\r\n"; }

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.0110.00716.50
8.3.50.0120.00322.06
8.3.40.0070.00718.79
8.3.30.0070.01118.89
8.3.20.0040.00420.34
8.3.10.0040.00423.55
8.3.00.0040.00420.97
8.2.180.0130.00316.63
8.2.170.0110.00422.96
8.2.160.0030.01020.22
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00419.23
8.2.110.0070.01022.27
8.2.100.0110.00018.16
8.2.90.0060.00319.17
8.2.80.0000.00917.97
8.2.70.0040.00417.71
8.2.60.0080.00317.93
8.2.50.0030.00518.07
8.2.40.0000.00819.88
8.2.30.0000.00718.38
8.2.20.0030.00617.77
8.2.10.0000.00718.19
8.2.00.0090.00019.65
8.1.280.0120.00325.92
8.1.270.0090.00023.95
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0070.00322.14
8.1.230.0040.00719.22
8.1.220.0000.00817.80
8.1.210.0070.00318.77
8.1.200.0000.00817.35
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0040.00418.84
8.1.160.0070.00021.95
8.1.150.0040.00418.63
8.1.140.0000.00717.53
8.1.130.0000.00717.91
8.1.120.0000.01017.50
8.1.110.0000.00717.60
8.1.100.0040.00417.57
8.1.90.0040.00417.57
8.1.80.0000.00717.43
8.1.70.0030.00517.54
8.1.60.0030.00617.56
8.1.50.0000.00917.67
8.1.40.0030.00617.50
8.1.30.0040.00417.66
8.1.20.0000.00817.70
8.1.10.0050.00217.46
8.1.00.0100.00017.41
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0070.00018.52
8.0.270.0030.00317.42
8.0.260.0000.00717.37
8.0.250.0070.00017.00
8.0.240.0090.00016.98
8.0.230.0070.00017.03
8.0.220.0040.00416.96
8.0.210.0050.00216.96
8.0.200.0000.00617.04
8.0.190.0040.00416.94
8.0.180.0030.00616.97
8.0.170.0000.00816.92
8.0.160.0000.00816.86
8.0.150.0040.00316.89
8.0.140.0000.00716.80
8.0.130.0000.00613.43
8.0.120.0050.00316.90
8.0.110.0050.00216.94
8.0.100.0040.00416.81
8.0.90.0040.00417.02
8.0.80.0130.00717.01
8.0.70.0040.00417.07
8.0.60.0070.00017.00
8.0.50.0040.00416.91
8.0.30.0100.00917.18
8.0.20.0100.00917.40
8.0.10.0050.00217.08
8.0.00.0080.00916.67
7.4.330.0000.00515.20
7.4.320.0030.00316.59
7.4.300.0030.00316.50
7.4.290.0000.00716.48
7.4.280.0070.00016.66
7.4.270.0040.00416.65
7.4.260.0070.00016.62
7.4.250.0040.00416.56
7.4.240.0000.00816.60
7.4.230.0000.00716.70
7.4.220.0110.00716.73
7.4.210.0080.00616.63
7.4.200.0040.00416.69
7.4.160.0090.01516.39
7.4.150.0160.00317.40
7.4.140.0110.00817.86
7.4.130.0080.01116.57
7.4.120.0120.00616.52
7.4.110.0090.00916.73
7.4.100.0080.00916.48
7.4.90.0090.01516.55
7.4.80.0130.00719.39
7.4.70.0060.00916.70
7.4.60.0120.00616.71
7.4.50.0000.00416.63
7.4.40.0110.01116.48
7.4.30.0150.00316.56
7.4.00.0110.00414.89
7.3.330.0030.00313.29
7.3.320.0000.00513.29
7.3.310.0000.00716.39
7.3.300.0030.00316.37
7.3.290.0090.00616.38
7.3.280.0070.00916.36
7.3.270.0130.00617.40
7.3.260.0070.01116.34
7.3.250.0070.01016.37
7.3.240.0160.00316.47
7.3.230.0100.00716.53
7.3.210.0030.01416.53
7.3.200.0110.00619.39
7.3.190.0080.01216.51
7.3.180.0080.00816.36
7.3.170.0100.00616.36
7.3.160.0060.01616.41
7.3.120.0100.00714.84
7.2.330.0120.00616.78
7.2.320.0060.01016.78
7.2.310.0140.00316.85
7.2.300.0110.00616.68
7.2.290.0040.01216.71
7.2.00.0030.01019.20
7.1.100.0060.00617.73
7.1.70.0040.00417.02
7.1.60.0070.01719.70
7.1.50.0190.00634.35
7.1.00.0070.07322.54
7.0.200.0000.01016.61
7.0.140.0070.07022.04
7.0.60.0030.04019.83
7.0.50.0100.03317.95
7.0.40.0000.05020.13
7.0.30.0500.07320.06
7.0.20.0330.04720.23
7.0.10.0230.07720.24
7.0.00.0170.08020.33
5.6.280.0070.06721.04
5.6.210.0070.06020.63
5.6.200.0100.07318.15
5.6.190.0200.06720.47
5.6.180.0270.04720.52
5.6.170.0200.07020.71
5.6.160.0100.06720.48
5.6.150.0030.06018.18
5.6.140.0030.04018.28
5.6.130.0170.07718.16
5.6.120.0070.06020.90
5.6.110.0100.04020.99
5.6.100.0000.08320.96
5.6.90.0170.06321.08
5.6.80.0070.03320.49
5.6.70.2770.03020.28
5.5.350.0000.09320.35
5.5.340.0130.03318.03
5.5.330.0200.06320.21
5.5.320.0300.05020.48
5.5.310.0200.06020.25
5.5.300.0070.06718.08
5.5.290.0030.05017.96
5.5.280.0030.04020.73
5.5.270.0100.03720.87
5.5.260.0130.05320.84
5.5.250.0030.06720.61
5.5.240.0300.06020.27
5.4.450.1300.04719.32
5.4.440.0100.03319.38
5.4.430.0100.03319.54
5.4.420.0030.03719.20
5.4.410.1100.04019.29
5.4.400.1800.04719.22
5.4.390.1600.03719.24
5.4.380.1630.03319.25
5.4.370.1670.04319.14
5.4.360.1930.04319.25
5.4.350.1870.04319.38
5.4.340.1800.04718.98
5.4.320.1700.03719.06
5.4.310.1470.03719.28
5.4.300.1400.04019.14
5.4.290.1630.03319.37
5.4.280.1530.04019.13
5.4.270.1870.04018.84
5.4.260.1570.04018.95
5.4.250.1570.03719.28
5.4.240.1770.05319.09
5.4.230.1900.04019.05
5.4.220.1670.03718.86
5.4.210.1830.04319.08
5.4.200.1600.03318.83
5.4.190.1770.04718.97
5.4.180.1700.04719.21
5.4.170.1630.05319.21
5.4.160.1730.04319.13
5.4.150.1900.04719.04
5.4.140.1730.04316.56
5.4.130.1730.04716.37
5.4.120.1730.04316.38
5.4.110.1830.03316.60
5.4.100.1770.03716.30
5.4.90.1770.04016.60
5.4.80.1500.03316.63
5.4.70.1700.04016.49
5.4.60.1570.04716.30
5.4.50.1500.03716.55
5.4.40.1700.03016.23
5.4.30.0200.06716.43
5.4.20.0170.03316.54
5.4.10.0130.04016.52
5.4.00.0230.06015.78
5.3.290.0200.06014.74
5.3.280.0270.03314.56
5.3.270.0130.08014.83
5.3.260.0200.07014.64
5.3.250.0170.05014.57
5.3.240.0170.07314.58
5.3.230.0130.06314.58
5.3.220.0400.05014.56
5.3.210.0170.06014.54
5.3.200.0230.04014.57
5.3.190.0200.06014.55
5.3.180.0170.04314.59
5.3.170.0300.03314.66
5.3.160.0100.04314.57
5.3.150.0270.03714.57
5.3.140.0070.04714.54
5.3.130.0130.04014.55
5.3.120.0170.03714.59
5.3.110.0130.04014.54
5.3.100.0170.03714.13
5.3.90.0230.03014.14
5.3.80.0130.04014.01
5.3.70.0230.03714.07
5.3.60.0230.02713.93
5.3.50.0200.03313.95
5.3.40.0170.04313.86
5.3.30.0170.03313.82
5.3.20.0230.03013.67
5.3.10.0230.03713.57
5.3.00.0230.04013.87
5.2.170.0100.03311.23
5.2.160.0200.02311.31
5.2.150.0200.03311.18
5.2.140.0130.03011.35
5.2.130.0100.03311.28
5.2.120.0130.03011.24
5.2.110.0200.03011.37
5.2.100.0200.03011.46
5.2.90.0230.02011.21
5.2.80.0130.03011.24
5.2.70.0230.03011.18
5.2.60.0070.03711.32
5.2.50.0170.03311.13
5.2.40.0130.03711.11
5.2.30.0130.02711.18
5.2.20.0100.03011.05
5.2.10.0130.03010.93
5.2.00.0070.03310.81
5.1.60.0130.03010.27
5.1.50.0100.02710.11
5.1.40.0170.02010.13
5.1.30.0130.02310.46
5.1.20.0170.03010.45
5.1.10.0130.02310.35
5.1.00.0130.02310.22
5.0.50.0070.0208.73
5.0.40.0100.0208.56
5.0.30.0070.0308.29
5.0.20.0000.0238.55
5.0.10.0070.0178.52
5.0.00.0100.0278.52
4.4.90.0100.0106.42
4.4.80.0070.0206.42
4.4.70.0070.0176.42
4.4.60.0070.0136.42
4.4.50.0070.0136.42
4.4.40.0000.0236.42
4.4.30.0100.0176.42
4.4.20.0070.0136.42
4.4.10.0070.0136.42
4.4.00.0030.0276.42
4.3.110.0030.0176.42
4.3.100.0070.0176.42
4.3.90.0070.0136.42
4.3.80.0070.0236.42
4.3.70.0070.0176.42
4.3.60.0030.0276.42
4.3.50.0070.0236.42
4.3.40.0100.0206.42
4.3.30.0030.0206.42
4.3.20.0000.0176.42
4.3.10.0000.0176.42
4.3.00.0030.0136.42

preferences:
45.17 ms | 401 KiB | 5 Q