3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numbers = array( 1234, 1234.05, 1234.005, 1234.5, 1234.50, 1234.55, 1234.505, 1234.555, 1234.5000, 1234.5500, 1234.5550, 1234.5555, 3, 3.05, 3.5, 3.50, 3.55, 3.550, 3.555, 3.5550, 3.5555, 5.49, 5.255, 5.252, 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.0070.00716.38
8.3.50.0100.00722.05
8.3.40.0070.00718.71
8.3.30.0130.00619.27
8.3.20.0060.00320.46
8.3.10.0040.00423.61
8.3.00.0050.00320.93
8.2.180.0110.00416.32
8.2.170.0120.00622.96
8.2.160.0100.01020.47
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0050.00326.16
8.2.120.0050.00319.48
8.2.110.0030.00620.34
8.2.100.0090.00317.78
8.2.90.0000.00819.04
8.2.80.0040.00417.97
8.2.70.0030.00617.49
8.2.60.0060.00318.05
8.2.50.0040.00418.07
8.2.40.0080.00019.94
8.2.30.0040.00418.38
8.2.20.0000.00717.67
8.2.10.0060.00318.07
8.2.00.0060.00319.63
8.1.280.0080.00825.92
8.1.270.0060.00323.88
8.1.260.0060.00326.35
8.1.250.0050.00328.09
8.1.240.0030.00623.91
8.1.230.0080.00319.03
8.1.220.0080.00017.79
8.1.210.0060.00318.77
8.1.200.0000.00917.13
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0060.00318.63
8.1.160.0040.00422.08
8.1.150.0040.00418.65
8.1.140.0040.00417.48
8.1.130.0030.00317.83
8.1.120.0030.00617.51
8.1.110.0030.00617.54
8.1.100.0040.00417.54
8.1.90.0000.00717.52
8.1.80.0030.00517.52
8.1.70.0070.00017.53
8.1.60.0030.00617.56
8.1.50.0080.00017.63
8.1.40.0000.00717.46
8.1.30.0000.00817.63
8.1.20.0000.00817.75
8.1.10.0000.00717.49
8.1.00.0070.00017.50
8.0.300.0040.00418.77
8.0.290.0080.00016.75
8.0.280.0000.00718.43
8.0.270.0030.00317.33
8.0.260.0000.00717.29
8.0.250.0070.00017.09
8.0.240.0040.00416.90
8.0.230.0000.00717.06
8.0.220.0030.00316.99
8.0.210.0030.00616.81
8.0.200.0000.00617.08
8.0.190.0040.00416.92
8.0.180.0080.00316.98
8.0.170.0080.00016.90
8.0.160.0000.00716.83
8.0.150.0040.00416.81
8.0.140.0070.00016.79
8.0.130.0060.00013.45
8.0.120.0040.00416.94
8.0.110.0040.00416.89
8.0.100.0050.00217.05
8.0.90.0050.00216.84
8.0.80.0060.00916.94
8.0.70.0020.00516.95
8.0.60.0000.00716.97
8.0.50.0000.00717.02
8.0.30.0120.00817.22
8.0.20.0120.00617.40
8.0.10.0050.00316.94
8.0.00.0070.01016.91
7.4.330.0000.00515.03
7.4.320.0000.00616.59
7.4.300.0000.00616.58
7.4.290.0050.00316.56
7.4.280.0030.00516.51
7.4.270.0030.00316.59
7.4.260.0000.01016.54
7.4.250.0040.00416.65
7.4.240.0000.00716.65
7.4.230.0030.00316.55
7.4.220.0070.01716.77
7.4.210.0000.01416.70
7.4.200.0030.00516.70
7.4.160.0100.01616.89
7.4.150.0080.01217.40
7.4.140.0120.00617.86
7.4.130.0050.01416.62
7.4.120.0110.00716.72
7.4.110.0100.00716.55
7.4.100.0090.00916.82
7.4.90.0140.01016.63
7.4.80.0140.00819.39
7.4.70.0030.01416.46
7.4.60.0130.00716.45
7.4.50.0000.00616.56
7.4.40.0170.00016.32
7.4.30.0110.00616.63
7.4.00.0110.00414.88
7.3.330.0030.00313.23
7.3.320.0000.00513.38
7.3.310.0030.00416.34
7.3.300.0020.00516.33
7.3.290.0110.00816.37
7.3.280.0080.01116.35
7.3.270.0140.00317.40
7.3.260.0110.01116.82
7.3.250.0100.00816.57
7.3.240.0060.00916.57
7.3.230.0100.00816.39
7.3.210.0120.00916.58
7.3.200.0110.00619.39
7.3.190.0090.00916.55
7.3.180.0040.01216.59
7.3.170.0170.00416.38
7.3.160.0100.00716.38
7.3.120.0030.01514.54
7.2.330.0100.01316.91
7.2.320.0110.00716.76
7.2.310.0110.00716.65
7.2.300.0050.01316.88
7.2.290.0130.01016.55
7.2.60.0030.01016.80
7.2.00.0040.00819.43
7.1.200.0000.01215.75
7.1.100.0060.00617.67
7.1.70.0030.01216.86
7.1.60.0100.01319.70
7.1.50.0030.01617.03
7.1.00.0100.06722.29
7.0.200.0030.00716.82
7.0.140.0030.07322.06
7.0.60.0130.07320.05
7.0.50.0070.06717.80
7.0.40.0070.06320.21
7.0.30.0330.07320.21
7.0.20.0270.08320.21
7.0.10.0100.08320.09
7.0.00.0100.08720.06
5.6.280.0030.07020.89
5.6.210.0000.09020.74
5.6.200.0030.06718.14
5.6.190.0100.04720.78
5.6.180.0170.06320.61
5.6.170.0230.08020.45
5.6.160.0030.09320.45
5.6.150.0070.08318.21
5.6.140.0070.08018.11
5.6.130.0130.08018.21
5.6.120.0000.04320.99
5.6.110.0000.04320.90
5.6.100.0030.08720.96
5.6.90.0100.08021.08
5.6.80.0070.03720.53
5.6.70.1700.03720.42
5.5.350.0030.07720.44
5.5.340.0170.04318.07
5.5.330.0100.04020.37
5.5.320.0230.03720.41
5.5.310.0230.06320.43
5.5.300.0100.07017.94
5.5.290.0030.06317.99
5.5.280.0000.04320.93
5.5.270.0030.04320.86
5.5.260.0070.08020.68
5.5.250.0070.04720.69
5.5.240.0230.06720.07
5.4.450.0370.04319.81
5.4.440.0270.04719.45
5.4.430.0230.05019.54
5.4.420.0270.04719.41
5.4.410.0430.03719.18
5.4.400.0770.03018.99
5.4.390.0270.03719.23
5.4.380.0230.05718.53
5.4.370.0300.04318.59
5.4.360.0130.05718.67
5.4.350.0170.06018.72
5.4.340.0170.05018.51
5.4.320.0090.03912.50
5.4.310.0070.04412.51
5.4.300.0050.03712.51
5.4.290.0070.04312.50
5.4.280.0030.03912.40
5.4.270.0080.04712.41
5.4.260.0090.03512.40
5.4.250.0080.04512.40
5.4.240.0080.04312.40
5.4.230.0070.03712.40
5.4.220.0060.03612.39
5.4.210.0100.03112.40
5.4.200.0040.03912.39
5.4.190.0060.03612.39
5.4.180.0070.03512.39
5.4.170.0060.03612.40
5.4.160.0080.03812.39
5.4.150.0070.03512.39
5.4.140.0070.04012.07
5.4.130.0050.03712.06
5.4.120.0050.04112.02
5.4.110.0060.03612.02
5.4.100.0030.03812.02
5.4.90.0070.03612.01
5.4.80.0040.05312.02
5.4.70.0070.03712.01
5.4.60.0060.04712.01
5.4.50.0070.03512.02
5.4.40.0050.03612.00
5.4.30.0050.03712.00
5.4.20.0040.03812.00
5.4.10.0040.03612.00
5.4.00.0100.03111.49
5.3.290.0090.04112.80
5.3.280.0070.03612.71
5.3.270.0090.03712.73
5.3.260.0060.04412.72
5.3.250.0080.03612.72
5.3.240.0070.03712.72
5.3.230.0060.03912.71
5.3.220.0060.03712.68
5.3.210.0070.04612.68
5.3.200.0060.03712.68
5.3.190.0070.03712.68
5.3.180.0060.03612.68
5.3.170.0040.03812.67
5.3.160.0070.03612.68
5.3.150.0060.03712.68
5.3.140.0070.03612.66
5.3.130.0030.04112.66
5.3.120.0040.04112.66
5.3.110.0090.03612.66
5.3.100.0050.03912.13
5.3.90.0070.03612.11
5.3.80.0090.04512.10
5.3.70.0080.03612.10
5.3.60.0090.03312.08
5.3.50.0090.03412.02
5.3.40.0060.03712.02
5.3.30.0070.03811.99
5.3.20.0060.03511.77
5.3.10.0050.03711.73
5.3.00.0060.03811.72
5.2.170.0100.0359.24
5.2.160.0050.0309.24
5.2.150.0100.0269.24
5.2.140.0050.0309.23
5.2.130.0080.0319.20
5.2.120.0050.0309.20
5.2.110.0050.0319.20
5.2.100.0040.0309.20
5.2.90.0070.0309.20
5.2.80.0060.0319.20
5.2.70.0080.0289.20
5.2.60.0040.0319.15
5.2.50.0070.0289.12
5.2.40.0070.0279.09
5.2.30.0020.0339.07
5.2.20.0060.0279.06
5.2.10.0010.0328.99
5.2.00.0020.0378.85
5.1.60.0060.0228.13
5.1.50.0040.0258.13
5.1.40.0040.0258.11
5.1.30.0030.0288.46
5.1.20.0050.0268.48
5.1.10.0040.0268.20
5.1.00.0070.0238.20
5.0.50.0030.0216.68
5.0.40.0020.0236.55
5.0.30.0070.0346.36
5.0.20.0080.0246.34
5.0.10.0040.0296.32
5.0.00.0060.0426.31
4.4.90.0080.0184.78
4.4.80.0040.0144.76
4.4.70.0020.0164.75
4.4.60.0010.0174.76
4.4.50.0030.0154.77
4.4.40.0020.0264.71
4.4.30.0030.0164.76
4.4.20.0020.0164.85
4.4.10.0050.0244.85
4.4.00.0010.0274.76
4.3.110.0020.0174.67
4.3.100.0030.0154.66
4.3.90.0030.0184.64
4.3.80.0010.0274.61
4.3.70.0020.0204.63
4.3.60.0030.0154.63
4.3.50.0020.0174.62
4.3.40.0000.0324.55
4.3.30.0020.0183.36
4.3.20.0020.0183.34
4.3.10.0020.0163.29
4.3.00.0070.01714.96

preferences:
37.81 ms | 401 KiB | 5 Q