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.252, 5.249, 5.244, 2.245, ); var_dump($numbers); echo PHP_EOL . PHP_EOL; 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.0100.01016.38
8.3.50.0190.00822.08
8.3.40.0090.00618.88
8.3.30.0120.00319.17
8.3.20.0040.00420.41
8.3.10.0030.00623.73
8.3.00.0050.00320.84
8.2.180.0120.00316.63
8.2.170.0140.00722.96
8.2.160.0070.00720.50
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0070.00026.16
8.2.120.0040.00419.50
8.2.110.0070.00322.24
8.2.100.0080.00418.16
8.2.90.0050.00519.26
8.2.80.0000.00817.97
8.2.70.0030.00617.75
8.2.60.0070.00318.05
8.2.50.0000.00918.07
8.2.40.0030.00718.03
8.2.30.0040.00418.18
8.2.20.0070.00017.74
8.2.10.0040.00418.08
8.2.00.0000.00819.51
8.1.280.0140.00725.92
8.1.270.0060.00324.02
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00622.04
8.1.230.0070.00419.05
8.1.220.0080.00017.79
8.1.210.0000.00818.77
8.1.200.0100.00017.48
8.1.190.0050.00317.35
8.1.180.0000.00818.10
8.1.170.0000.00818.46
8.1.160.0040.00422.00
8.1.150.0040.00418.63
8.1.140.0030.00617.44
8.1.130.0040.00417.93
8.1.120.0050.00517.58
8.1.110.0000.00817.45
8.1.100.0000.00717.52
8.1.90.0050.00217.54
8.1.80.0030.00617.51
8.1.70.0000.00817.48
8.1.60.0040.00417.53
8.1.50.0000.00817.57
8.1.40.0050.00317.60
8.1.30.0040.00417.72
8.1.20.0030.00517.74
8.1.10.0000.00717.48
8.1.00.0000.00717.59
8.0.300.0060.00318.77
8.0.290.0050.00216.75
8.0.280.0030.00318.55
8.0.270.0070.00017.21
8.0.260.0050.00317.33
8.0.250.0070.00017.05
8.0.240.0090.00017.09
8.0.230.0040.00417.04
8.0.220.0000.00716.96
8.0.210.0040.00416.87
8.0.200.0030.00316.96
8.0.190.0050.00316.95
8.0.180.0060.00317.02
8.0.170.0020.00516.94
8.0.160.0000.00716.92
8.0.150.0040.00416.91
8.0.140.0030.00516.91
8.0.130.0060.00013.48
8.0.120.0040.00416.90
8.0.110.0000.00816.86
8.0.100.0000.00716.84
8.0.90.0040.00416.98
8.0.80.0150.00316.93
8.0.70.0040.00417.03
8.0.60.0000.00716.75
8.0.50.0070.00016.82
8.0.30.0140.00817.14
8.0.20.0170.00417.41
8.0.10.0000.00817.11
8.0.00.0060.01316.88
7.4.330.0020.00215.21
7.4.320.0070.00016.68
7.4.300.0000.00616.59
7.4.290.0080.00016.59
7.4.280.0000.00716.66
7.4.270.0000.00816.60
7.4.260.0050.00316.63
7.4.250.0000.00816.56
7.4.240.0040.00416.64
7.4.230.0000.00716.63
7.4.220.0090.01016.63
7.4.210.0090.00616.69
7.4.200.0040.00416.41
7.4.160.0060.01116.49
7.4.150.0100.01017.40
7.4.140.0120.00817.86
7.4.130.0100.00816.50
7.4.120.0110.01016.55
7.4.110.0150.00316.47
7.4.100.0060.01216.66
7.4.90.0140.00616.44
7.4.80.0140.00519.39
7.4.70.0150.00316.70
7.4.60.0140.00616.59
7.4.50.0040.00016.72
7.4.40.0070.01116.66
7.4.30.0110.01016.66
7.4.10.0060.01215.01
7.4.00.0110.00715.06
7.3.330.0000.00513.16
7.3.320.0000.00513.33
7.3.310.0070.00016.37
7.3.300.0000.00716.25
7.3.290.0090.00616.38
7.3.280.0110.01016.36
7.3.270.0080.01217.40
7.3.260.0050.01416.63
7.3.250.0090.00916.72
7.3.240.0190.00016.41
7.3.230.0130.01016.46
7.3.210.0080.01016.72
7.3.200.0110.00616.63
7.3.190.0120.00916.63
7.3.180.0120.00416.41
7.3.170.0100.00716.61
7.3.160.0100.00716.52
7.3.130.0080.01114.94
7.3.120.0080.00714.77
7.3.110.0050.01114.57
7.3.100.0100.00614.99
7.3.90.0050.00814.71
7.3.80.0070.00214.90
7.3.70.0040.01014.77
7.3.60.0030.00814.90
7.3.50.0080.00614.80
7.3.40.0030.00714.91
7.3.30.0020.01114.72
7.3.20.0090.00716.76
7.3.10.0020.01116.50
7.3.00.0050.01016.60
7.2.330.0130.00716.79
7.2.320.0160.00816.85
7.2.310.0100.00716.67
7.2.300.0030.01416.77
7.2.290.0120.01516.86
7.2.260.0110.00714.93
7.2.250.0070.00715.09
7.2.240.0080.00815.01
7.2.230.0080.01015.23
7.2.220.0070.01115.05
7.2.210.0090.00915.15
7.2.200.0040.00815.21
7.2.190.0030.00815.12
7.2.180.0050.01114.98
7.2.170.0060.00714.96
7.2.160.0060.00814.97
7.2.150.0060.00616.96
7.2.140.0070.00517.04
7.2.130.0030.01216.90
7.2.120.0050.01017.04
7.2.110.0080.00616.90
7.2.100.0030.01116.96
7.2.90.0090.00516.99
7.2.80.0020.01516.88
7.2.70.0040.01316.87
7.2.60.0030.01017.00
7.2.50.0020.01217.04
7.2.40.0090.00817.03
7.2.30.0060.00816.94
7.2.20.0030.01016.85
7.2.10.0050.00717.00
7.2.00.0030.01417.79
7.1.330.0050.00815.69
7.1.320.0030.01215.78
7.1.310.0060.00815.84
7.1.300.0100.00515.71
7.1.290.0030.01215.66
7.1.280.0080.00215.60
7.1.270.0020.01215.55
7.1.260.0050.00815.94
7.1.250.0100.00416.01
7.1.240.0010.01115.78
7.1.230.0030.01015.61
7.1.220.0030.01015.79
7.1.210.0040.01115.67
7.1.200.0050.00815.70
7.1.190.0060.00815.82
7.1.180.0030.01015.83
7.1.170.0030.01315.72
7.1.160.0030.01215.86
7.1.150.0070.01015.74
7.1.140.0100.00315.73
7.1.130.0070.00515.76
7.1.120.0060.00615.70
7.1.110.0060.00615.94
7.1.100.0030.00816.54
7.1.90.0030.01215.82
7.1.80.0090.00315.89
7.1.70.0020.01016.30
7.1.60.0070.01017.02
7.1.50.0050.00516.29
7.1.40.0050.00815.85
7.1.30.0100.00415.84
7.1.20.0080.00215.75
7.1.10.0070.00515.57
7.1.00.0050.03018.04
7.0.330.0050.00515.34
7.0.320.0090.00315.43
7.0.310.0060.00715.26
7.0.300.0020.01215.32
7.0.290.0080.00715.38
7.0.280.0070.00715.39
7.0.270.0050.00715.29
7.0.260.0050.01015.52
7.0.250.0020.01115.41
7.0.240.0060.00615.51
7.0.230.0060.00915.30
7.0.220.0060.00515.53
7.0.210.0060.00615.27
7.0.200.0040.00715.76
7.0.190.0050.00615.49
7.0.180.0030.00815.56
7.0.170.0070.00815.39
7.0.160.0030.00915.44
7.0.150.0000.01515.42
7.0.140.0030.02817.59
7.0.130.0080.00415.54
7.0.120.0090.00615.29
7.0.110.0120.00415.58
7.0.100.0070.00515.31
7.0.90.0060.00415.43
7.0.80.0050.00715.48
7.0.70.0100.00115.48
7.0.60.0050.03416.83
7.0.50.0050.03116.36
7.0.40.0060.03215.75
7.0.30.0110.02215.83
7.0.20.0160.02815.76
7.0.10.0020.03115.44
7.0.00.0030.03515.69
5.6.400.0060.00814.21
5.6.390.0080.00614.65
5.6.380.0060.00614.48
5.6.370.0100.00514.57
5.6.360.0020.01014.35
5.6.350.0100.00614.53
5.6.340.0050.00614.30
5.6.330.0070.00714.40
5.6.320.0020.00814.48
5.6.310.0040.01114.47
5.6.300.0070.00514.59
5.6.290.0030.01214.33
5.6.280.0070.02916.59
5.6.270.0100.00614.30
5.6.260.0050.01014.34
5.6.250.0080.00314.18
5.6.240.0040.00914.47
5.6.230.0110.00314.46
5.6.220.0080.00514.38
5.6.210.0040.03316.32
5.6.200.0060.03515.74
5.6.190.0080.02816.44
5.6.180.1160.01816.34
5.6.170.0170.03116.42
5.6.160.0080.01716.32
5.6.150.0090.03115.78
5.6.140.0080.01615.51
5.6.130.0040.03515.54
5.6.120.0090.02316.59
5.6.110.0070.03416.45
5.6.100.0130.02316.56
5.6.90.0010.03816.43
5.6.80.0060.02716.28
5.6.70.1390.01816.19
5.6.60.0030.01114.48
5.6.50.0080.00314.21
5.6.40.0030.01014.35
5.6.30.0020.00914.03
5.6.20.0090.00614.24
5.6.10.0050.00914.04
5.6.00.0080.00814.39
5.5.380.0040.00814.36
5.5.370.0130.00514.35
5.5.360.0060.00514.44
5.5.350.0040.03516.27
5.5.340.0070.02615.39
5.5.330.0100.03316.28
5.5.320.0100.02716.41
5.5.310.0110.02916.35
5.5.300.0100.02815.61
5.5.290.0060.03015.63
5.5.280.0040.03616.57
5.5.270.0060.03016.49
5.5.260.0090.01616.51
5.5.250.0110.02216.21
5.5.240.0130.02916.31
5.5.230.0000.01214.29
5.5.220.0060.00414.14
5.5.210.0030.00914.23
5.5.200.0070.00714.28
5.5.190.0040.01014.25
5.5.180.0090.00514.25
5.5.170.0040.00814.33
5.5.160.0040.01014.07
5.5.150.0050.01114.34
5.5.140.0060.00714.21
5.5.130.0050.00714.18
5.5.120.0050.00914.13
5.5.110.0070.00514.28
5.5.100.0060.00714.16
5.5.90.0030.01214.03
5.5.80.0080.00514.08
5.5.70.0050.00814.09
5.5.60.0060.00614.14
5.5.50.0050.00814.33
5.5.40.0060.01014.15
5.5.30.0060.00614.18
5.5.20.0050.00414.19
5.5.10.0030.01114.26
5.5.00.0110.00214.20
5.4.450.0200.01414.61
5.4.440.0190.01614.63
5.4.430.0190.01714.55
5.4.420.0230.01714.65
5.4.410.0160.01814.65
5.4.400.0160.01614.49
5.4.390.0140.01514.42
5.4.380.0060.02514.29
5.4.370.0090.02014.35
5.4.360.0120.02114.29
5.4.350.0090.02014.37
5.4.340.0060.02414.38
5.4.330.0020.00712.20
5.4.320.0050.01612.30
5.4.310.0040.01812.30
5.4.300.0050.01712.30
5.4.290.0050.01512.30
5.4.280.0040.01812.26
5.4.270.0050.01912.26
5.4.260.0040.02012.27
5.4.250.0050.01612.26
5.4.240.0060.01512.26
5.4.230.0040.01712.26
5.4.220.0030.01912.26
5.4.210.0040.02212.26
5.4.200.0070.01712.26
5.4.190.0080.01712.26
5.4.180.0050.01612.26
5.4.170.0020.01712.26
5.4.160.0060.01612.26
5.4.150.0050.01612.26
5.4.140.0030.02012.16
5.4.130.0040.01912.15
5.4.120.0080.01512.13
5.4.110.0070.01512.13
5.4.100.0090.01312.13
5.4.90.0050.02012.13
5.4.80.0050.01712.13
5.4.70.0050.01812.13
5.4.60.0030.01912.13
5.4.50.0050.01712.13
5.4.40.0040.01712.13
5.4.30.0040.01712.13
5.4.20.0040.01712.13
5.4.10.0040.01912.13
5.4.00.0040.02011.96
5.3.290.0070.01712.40
5.3.280.0030.01812.37
5.3.270.0030.02012.37
5.3.260.0060.01612.37
5.3.250.0060.01512.37
5.3.240.0060.01612.37
5.3.230.0060.01712.37
5.3.220.0050.01612.36
5.3.210.0060.02112.36
5.3.200.0050.01812.36
5.3.190.0060.01512.36
5.3.180.0010.01812.36
5.3.170.0030.01712.35
5.3.160.0040.01912.35
5.3.150.0030.01912.36
5.3.140.0070.01512.35
5.3.130.0040.01612.35
5.3.120.0060.01712.35
5.3.110.0040.01712.35
5.3.100.0070.01412.17
5.3.90.0050.01612.17
5.3.80.0020.01912.16
5.3.70.0050.01612.16
5.3.60.0050.01512.16
5.3.50.0060.01512.14
5.3.40.0060.01412.14
5.3.30.0020.01812.13
5.3.20.0080.01312.05
5.3.10.0040.01712.04
5.3.00.0050.01612.04
5.2.170.0050.0339.24
5.2.160.0030.0339.24
5.2.150.0040.0339.24
5.2.140.0050.0319.24
5.2.130.0050.0299.20
5.2.120.0070.0329.20
5.2.110.0050.0369.20
5.2.100.0090.0269.20
5.2.90.0050.0299.20
5.2.80.0080.0419.20
5.2.70.0050.0329.20
5.2.60.0070.0299.15
5.2.50.0120.0369.12
5.2.40.0070.0299.09
5.2.30.0070.0309.07
5.2.20.0050.0309.06
5.2.10.0060.0278.98
5.2.00.0040.0318.85
5.1.60.0010.0288.13
5.1.50.0100.0298.13
5.1.40.0040.0268.11
5.1.30.0040.0278.46
5.1.20.0090.0298.48
5.1.10.0070.0248.21
5.1.00.0090.0338.21
5.0.50.0030.0246.69
5.0.40.0000.0256.54
5.0.30.0020.0336.36
5.0.20.0040.0196.34
5.0.10.0020.0226.32
5.0.00.0020.0326.31
4.4.90.0040.0184.78
4.4.80.0050.0144.75
4.4.70.0020.0174.76
4.4.60.0060.0134.76
4.4.50.0070.0124.77
4.4.40.0030.0274.71
4.4.30.0030.0164.76
4.4.20.0030.0164.85
4.4.10.0050.0154.85
4.4.00.0010.0274.76
4.3.110.0030.0164.67
4.3.100.0030.0154.66
4.3.90.0020.0174.64
4.3.80.0020.0264.61
4.3.70.0010.0174.63
4.3.60.0010.0164.63
4.3.50.0050.0144.63
4.3.40.0030.0264.55
4.3.30.0010.0203.36
4.3.20.0010.0183.34
4.3.10.0050.0193.30
4.3.00.0070.01314.95

preferences:
55.89 ms | 401 KiB | 5 Q