3v4l.org

run code in 300+ PHP versions simultaneously
<?php $separator = 'comma'; $number = '1,233,332.34'; if ($separator == 'comma') { $number = str_replace(',', '', $number); } echo number_format($number, 2, ',','.');

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.00418.14
8.3.50.0120.00716.42
8.3.40.0070.00718.59
8.3.30.0040.01118.67
8.3.20.0080.00018.57
8.3.10.0050.00320.61
8.3.00.0030.00517.50
8.2.180.0100.01016.50
8.2.170.0140.00022.96
8.2.160.0170.00022.11
8.2.150.0090.00024.18
8.2.140.0020.00524.66
8.2.130.0040.00426.16
8.2.120.0040.00419.77
8.2.110.0060.00321.06
8.2.100.0080.00317.91
8.2.90.0000.00919.22
8.2.80.0000.00718.04
8.2.70.0050.00317.50
8.2.60.0000.00818.16
8.2.50.0080.00018.07
8.2.40.0050.00318.22
8.2.30.0050.00318.20
8.2.20.0080.00017.78
8.2.10.0000.00717.65
8.2.00.0080.00017.79
8.1.280.0070.00725.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00622.61
8.1.230.0080.00421.04
8.1.220.0040.00418.77
8.1.210.0000.00818.97
8.1.200.0030.00617.23
8.1.190.0030.00617.52
8.1.180.0080.00018.10
8.1.170.0040.00418.82
8.1.160.0050.00218.90
8.1.150.0080.00018.69
8.1.140.0000.00717.42
8.1.130.0000.00717.80
8.1.120.0040.00417.54
8.1.110.0000.00817.41
8.1.100.0050.00217.50
8.1.90.0000.00817.57
8.1.80.0050.00217.50
8.1.70.0030.00317.53
8.1.60.0050.00217.64
8.1.50.0000.00717.54
8.1.40.0080.00017.58
8.1.30.0030.00617.75
8.1.20.0040.00417.76
8.1.10.0000.00717.61
8.1.00.0040.00417.39
8.0.300.0040.00420.02
8.0.290.0000.00816.88
8.0.280.0070.00018.49
8.0.270.0000.00717.32
8.0.260.0070.00018.68
8.0.250.0070.00016.85
8.0.240.0070.00317.05
8.0.230.0040.00416.92
8.0.220.0050.00216.78
8.0.210.0020.00516.77
8.0.200.0000.00616.84
8.0.190.0030.00316.99
8.0.180.0020.00516.93
8.0.170.0090.00016.96
8.0.160.0030.00316.84
8.0.150.0050.00216.67
8.0.140.0120.00016.79
8.0.130.0000.00613.36
8.0.120.0040.00416.90
8.0.110.0050.00316.82
8.0.100.0050.00216.73
8.0.90.0040.00416.88
8.0.80.0110.00316.86
8.0.70.0030.00617.00
8.0.60.0030.00416.90
8.0.50.0070.00016.92
8.0.30.0100.00917.04
8.0.20.0110.00817.07
8.0.10.0050.00317.08
8.0.00.0120.01117.07
7.4.330.0050.00014.90
7.4.320.0030.00316.64
7.4.300.0040.00416.62
7.4.290.0030.00316.55
7.4.280.0040.00716.64
7.4.270.0030.00316.64
7.4.260.0030.00313.34
7.4.250.0040.00416.66
7.4.240.0000.00716.56
7.4.230.0000.00716.31
7.4.220.0090.01216.62
7.4.210.0110.00716.64
7.4.200.0070.00016.57
7.4.190.0000.00716.43
7.4.160.0120.00316.50
7.4.150.0110.00717.07
7.4.140.0110.00517.19
7.4.130.0110.00516.54
7.4.120.0090.00816.50
7.4.110.0100.01016.37
7.4.100.0150.00316.36
7.4.90.0130.01016.56
7.4.80.0100.00718.80
7.4.70.0090.01216.71
7.4.60.0030.01216.51
7.4.50.0050.00016.50
7.4.40.0110.00622.27
7.4.30.0100.00616.59
7.4.00.0060.01014.90
7.3.330.0030.00313.17
7.3.320.0050.00013.17
7.3.310.0070.00016.35
7.3.300.0000.00616.29
7.3.290.0060.01716.33
7.3.280.0050.01316.25
7.3.270.0110.00717.07
7.3.260.0110.01018.24
7.3.250.0110.00816.47
7.3.240.0120.00916.32
7.3.230.0160.00016.39
7.3.210.0030.01316.36
7.3.200.0060.01219.39
7.3.190.0060.01316.48
7.3.180.0060.01016.24
7.3.170.0060.01316.57
7.3.160.0080.00816.27
7.3.120.0060.00814.77
7.3.110.0000.01914.57
7.3.100.0090.00014.80
7.3.90.0070.01114.46
7.3.80.0060.00614.65
7.3.70.0040.00714.48
7.3.60.0030.00614.62
7.3.50.0030.00714.50
7.3.40.0030.01314.85
7.3.30.0090.00614.59
7.3.20.0110.00316.45
7.3.10.0060.00916.59
7.3.00.0110.00516.44
7.2.330.0060.01316.70
7.2.320.0070.01016.42
7.2.310.0100.01316.51
7.2.300.0150.00316.55
7.2.290.0100.00716.55
7.2.250.0070.01114.83
7.2.240.0040.01814.69
7.2.230.0080.01114.48
7.2.220.0030.00914.95
7.2.210.0090.00614.55
7.2.200.0040.00714.88
7.2.190.0030.00914.66
7.2.180.0030.01214.98
7.2.170.0030.01414.89
7.2.130.0090.00416.73
7.2.120.0030.00916.64
7.2.110.0080.00616.54
7.2.100.0040.00716.39
7.2.90.0070.00716.79
7.2.80.0040.00916.95
7.2.70.0030.00916.73
7.2.60.0100.00616.83
7.2.50.0030.01016.71
7.2.40.0100.00516.96
7.2.30.0080.00716.69
7.2.20.0100.00716.73
7.2.10.0060.00516.74
7.2.00.0030.00917.71
7.1.330.0110.00315.85
7.1.320.0000.01115.67
7.1.310.0030.01215.77
7.1.300.0100.00315.55
7.1.290.0040.00615.68
7.1.280.0080.00015.66
7.1.270.0120.00315.66
7.1.260.0120.00015.64
7.1.250.0030.00615.62
7.1.100.0030.01017.95
7.1.70.0130.00016.86
7.1.60.0040.00717.17
7.1.50.0030.01616.86
7.1.00.0000.07322.30
7.0.200.0030.01216.54
7.0.140.0000.07722.00
7.0.60.0070.05021.66
7.0.50.0170.07017.80
7.0.40.0130.08019.91
7.0.30.0570.06020.20
7.0.20.0230.08320.30
7.0.10.0070.04020.00
7.0.00.0130.08320.12
5.6.280.0030.07321.10
5.6.210.0030.08020.45
5.6.200.0170.04318.15
5.6.190.0100.04020.60
5.6.180.0200.07720.35
5.6.170.0270.08320.54
5.6.160.0070.07720.59
5.6.150.0030.08318.15
5.6.140.0130.04018.21
5.6.130.0000.09018.21
5.6.120.0100.08321.01
5.6.110.0100.08021.01
5.6.100.0100.07320.88
5.6.90.0070.08320.96
5.6.80.0100.07020.40
5.5.350.0100.07020.38
5.5.340.0070.06717.96
5.5.330.0100.05020.28
5.5.320.0500.06320.17
5.5.310.0270.04720.33
5.5.300.0070.06718.02
5.5.290.0130.07717.87
5.5.280.0070.07720.80
5.5.270.0100.08020.64
5.5.260.0000.06320.64
5.5.250.0030.09020.60
5.5.240.0230.07020.27
5.4.450.0030.04319.50
5.4.440.0000.05719.54
5.4.430.0130.07019.46
5.4.420.0070.07719.11
5.4.410.0100.04719.28
5.4.400.0070.04319.20
5.4.390.0100.04018.92
5.4.380.0070.04019.18
5.4.370.0100.03319.08
5.4.360.0070.08018.79
5.4.350.0100.07319.18
5.4.340.0130.07718.80
5.4.320.0100.07718.98
5.4.310.0170.03719.07
5.4.300.0000.05719.19
5.4.290.0100.07019.21
5.4.280.0170.03719.17
5.4.270.0070.04019.09
5.4.260.0030.08318.78
5.4.250.0130.03019.14
5.4.240.0030.04019.17
5.4.230.0030.04019.13
5.4.220.0130.07019.17
5.4.210.0030.05319.13
5.4.200.0100.04318.91
5.4.190.0130.06719.07
5.4.180.0130.03719.17
5.4.170.0030.04319.10
5.4.160.0030.06019.04
5.4.150.0100.08019.15
5.4.140.0030.06716.29
5.4.130.0070.06016.26
5.4.120.0070.08316.34
5.4.110.0170.06316.40
5.4.100.0130.05716.36
5.4.90.0070.07316.31
5.4.80.0100.06716.33
5.4.70.0130.06316.32
5.4.60.0070.07716.38
5.4.50.0100.06016.21
5.4.40.0100.07016.36
5.4.30.0030.05316.21
5.4.20.0070.05016.27
5.4.10.0030.07716.57
5.4.00.0070.06015.88
5.3.290.0030.07714.60
5.3.280.0100.04314.52
5.3.270.0030.08014.42
5.3.260.0130.07314.69
5.3.250.0070.07314.69
5.3.240.0030.07714.53
5.3.230.0070.06314.55
5.3.220.0030.05314.65
5.3.210.0100.08014.50
5.3.200.0100.06714.50
5.3.190.0100.07314.49
5.3.180.0100.06714.57
5.3.170.0170.06014.49
5.3.160.0130.04314.48
5.3.150.0030.07714.41
5.3.140.0100.04014.50
5.3.130.0070.08314.50
5.3.120.0030.05714.49
5.3.110.0030.07014.47
5.3.100.0000.06013.98
5.3.90.0030.05313.87
5.3.80.0070.07713.89
5.3.70.0070.04313.95
5.3.60.0070.06313.82
5.3.50.0100.04013.92
5.3.40.0070.07013.76
5.3.30.0100.06713.70
5.3.20.0070.04013.62
5.3.10.0030.04313.59
5.3.00.0070.06713.56
5.2.170.0070.04311.20
5.2.160.0000.06311.21
5.2.150.0070.04311.14
5.2.140.0100.04711.29
5.2.130.0030.06711.21
5.2.120.0100.02311.06
5.2.110.0100.03711.21
5.2.100.0100.05711.10
5.2.90.0070.03711.17
5.2.80.0000.04311.12
5.2.70.0070.04011.09
5.2.60.0070.05011.04
5.2.50.0070.06311.02
5.2.40.0030.02711.08
5.2.30.0070.06010.96
5.2.20.0070.02311.08
5.2.10.0000.03010.91
5.2.00.0000.03010.90
5.1.60.0030.02310.05
5.1.50.0000.02710.18
5.1.40.0000.02710.00
5.1.30.0000.02710.31
5.1.20.0030.02310.41
5.1.10.0030.02310.20
5.1.00.0000.02710.14
5.0.50.0030.0238.68
5.0.40.0000.0208.37
5.0.30.0000.0338.25
5.0.20.0000.0208.24
5.0.10.0030.0178.29
5.0.00.0030.0278.25
4.4.90.0000.0378.00
4.4.80.0070.0278.00
4.4.70.0000.0178.00
4.4.60.0000.0178.00
4.4.50.0070.0108.00
4.4.40.0000.0278.00
4.4.30.0000.0178.00
4.4.20.0000.0178.00
4.4.10.0000.0178.00
4.4.00.0030.0238.00
4.3.110.0000.0178.00
4.3.100.0000.0208.00
4.3.90.0000.0138.00
4.3.80.0000.0238.00
4.3.70.0000.0138.00
4.3.60.0000.0138.00
4.3.50.0000.0178.00
4.3.40.0000.0238.00
4.3.30.0000.0178.00
4.3.20.0030.0178.00
4.3.10.0000.0138.00
4.3.00.0000.0138.00

preferences:
39.8 ms | 401 KiB | 5 Q