3v4l.org

run code in 300+ PHP versions simultaneously
<?php $separator = 'comma'; $number = '1,233,332.34'; $number2 = '1.233.332,34'; $thousand_separator = ','; if ($separator != 'comma') { $thousand_separator = '.'; } // Remove the thousand separator $number = str_replace($thousand_separator, '', $number); $number2 = str_replace($thousand_separator, '', $number2); echo '$number: ' . number_format($number, 2, ',','.') . PHP_EOL; echo '$number: ' . number_format($number2, 2, ',','.') . PHP_EOL;

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.70.0040.01116.50
8.3.60.0070.01316.50
8.3.50.0250.00621.97
8.3.40.0140.00418.99
8.3.30.0100.00719.17
8.3.20.0000.00720.46
8.3.10.0070.00023.78
8.3.00.0040.00419.38
8.2.180.0120.00318.29
8.2.170.0070.00722.96
8.2.160.0060.00620.52
8.2.150.0050.00224.18
8.2.140.0080.00024.66
8.2.130.0140.00326.16
8.2.120.0000.00722.08
8.2.110.0030.00722.30
8.2.100.0090.00617.88
8.2.90.0050.00317.88
8.2.80.0080.00019.03
8.2.70.0000.00817.75
8.2.60.0000.00817.93
8.2.50.0000.00818.07
8.2.40.0040.00418.22
8.2.30.0060.00318.23
8.2.20.0050.00317.74
8.2.10.0040.00419.97
8.2.00.0060.00317.95
8.1.280.0080.00625.92
8.1.270.0000.00823.73
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0070.00321.05
8.1.230.0100.00322.63
8.1.220.0000.00817.77
8.1.210.0060.00318.77
8.1.200.0030.00517.25
8.1.190.0060.00317.35
8.1.180.0030.00618.10
8.1.170.0050.00318.59
8.1.160.0000.00722.06
8.1.150.0040.00418.70
8.1.140.0070.00017.57
8.1.130.0070.00017.83
8.1.120.0040.00417.59
8.1.110.0070.00017.46
8.1.100.0040.00317.53
8.1.90.0040.00417.60
8.1.80.0050.00217.54
8.1.70.0030.00317.48
8.1.60.0000.00817.52
8.1.50.0040.00417.61
8.1.40.0040.00417.51
8.1.30.0040.00417.55
8.1.20.0050.00317.79
8.1.10.0040.00417.62
8.1.00.0040.00417.51
8.0.300.0030.00618.77
8.0.290.0040.00416.88
8.0.280.0030.00318.45
8.0.270.0040.00417.34
8.0.260.0000.00716.97
8.0.250.0000.00817.07
8.0.240.0030.00517.09
8.0.230.0000.00717.03
8.0.220.0000.00717.04
8.0.210.0050.00516.93
8.0.200.0030.00517.08
8.0.190.0060.00617.13
8.0.180.0050.00316.93
8.0.170.0050.00317.03
8.0.160.0070.00017.02
8.0.150.0000.00816.95
8.0.140.0000.00816.89
8.0.130.0000.00613.48
8.0.120.0040.00416.90
8.0.110.0050.00217.01
8.0.100.0000.00816.90
8.0.90.0040.00416.90
8.0.80.0120.00317.00
8.0.70.0040.00416.97
8.0.60.0000.00716.81
8.0.50.0040.00416.86
8.0.30.0080.01117.21
8.0.20.0110.00817.40
8.0.10.0000.00716.95
8.0.00.0140.00716.87
7.4.330.0020.00215.11
7.4.320.0030.00316.52
7.4.300.0060.00016.59
7.4.290.0000.00816.59
7.4.280.0060.00316.71
7.4.270.0030.00316.61
7.4.260.0030.00316.68
7.4.250.0000.00716.54
7.4.240.0030.00316.63
7.4.230.0030.00316.76
7.4.220.0090.00916.63
7.4.210.0070.00916.64
7.4.200.0030.00516.39
7.4.190.0070.00016.72
7.4.160.0090.00616.64
7.4.150.0030.01917.40
7.4.140.0090.00917.86
7.4.130.0140.00316.63
7.4.120.0110.00816.72
7.4.110.0030.01316.70
7.4.100.0090.01016.64
7.4.90.0060.01116.61
7.4.80.0080.00819.39
7.4.70.0070.01516.53
7.4.60.0100.00716.61
7.4.50.0090.00016.52
7.4.40.0080.00822.77
7.4.30.0060.01516.64
7.4.00.0060.00615.01
7.3.330.0050.00013.21
7.3.320.0030.00313.15
7.3.310.0030.00516.45
7.3.300.0030.00316.45
7.3.290.0070.00716.39
7.3.280.0070.01116.42
7.3.270.0170.00017.40
7.3.260.0130.00316.71
7.3.250.0160.00516.55
7.3.240.0000.02216.41
7.3.230.0120.00616.64
7.3.210.0120.00616.61
7.3.200.0060.01219.39
7.3.190.0190.00316.42
7.3.180.0130.00316.47
7.3.170.0090.00616.43
7.3.160.0090.00616.40
7.3.120.0090.00314.80
7.2.330.0070.01416.57
7.2.320.0120.00616.89
7.2.310.0070.01416.70
7.2.300.0040.01416.64
7.2.290.0060.01216.89
7.2.00.0150.00619.44
7.1.100.0040.01118.16
7.1.70.0000.00817.20
7.1.60.0120.01219.33
7.1.50.0060.01316.91
7.1.00.0030.07722.47
7.0.200.0030.01016.79
7.0.140.0070.07021.95
7.0.60.0030.04019.94
7.0.50.0070.03717.88
7.0.40.0070.08720.06
7.0.30.0230.05720.02
7.0.20.0130.04320.20
7.0.10.0370.05320.20
7.0.00.0070.08320.00
5.6.280.0000.07720.99
5.6.210.0130.04320.61
5.6.200.0130.03718.23
5.6.190.0100.05320.59
5.6.180.0230.06020.46
5.6.170.0170.05320.58
5.6.160.0030.04320.51
5.6.150.0100.07718.11
5.6.140.0070.03718.09
5.6.130.0000.04318.16
5.6.120.0100.07320.96
5.6.110.0070.08320.88
5.6.100.0170.07320.95
5.6.90.0070.06720.95
5.6.80.0070.07720.33
5.6.70.4570.03720.27
5.5.350.0130.07320.30
5.5.340.0130.07318.02
5.5.330.0130.03320.40
5.5.320.0100.07720.36
5.5.310.0200.03720.34
5.5.300.0030.04017.95
5.5.290.0100.06717.96
5.5.280.0030.05720.84
5.5.270.0130.08020.75
5.5.260.0170.07720.95
5.5.250.0100.05320.79
5.5.240.0300.05020.18
5.4.450.0200.06019.45
5.4.440.0470.07019.16
5.4.430.0630.05719.46
5.4.420.0870.04319.47
5.4.410.0600.06719.37
5.4.400.0600.04718.99
5.4.390.0770.05719.16
5.4.380.0170.05018.58
5.4.370.0200.04718.63
5.4.360.0130.05318.50
5.4.350.0270.05718.78
5.4.340.0170.05318.68
5.4.320.0040.03912.46
5.4.310.0060.04012.46
5.4.300.0040.03712.46
5.4.290.0050.04512.45
5.4.280.0100.03412.35
5.4.270.0100.04512.36
5.4.260.0070.03512.35
5.4.250.0050.03812.35
5.4.240.0070.03412.35
5.4.230.0110.04112.34
5.4.220.0080.03312.35
5.4.210.0050.04012.35
5.4.200.0060.03712.34
5.4.190.0180.04412.33
5.4.180.0200.04012.33
5.4.170.0270.06312.34
5.4.160.0170.04412.33
5.4.150.0180.04312.33
5.4.140.0390.08212.01
5.4.130.0110.04912.00
5.4.120.0150.04511.96
5.4.110.0150.04311.95
5.4.100.0160.04411.95
5.4.90.0180.04111.95
5.4.80.0150.04411.95
5.4.70.0130.04611.95
5.4.60.0140.04511.95
5.4.50.0160.04311.95
5.4.40.0160.04211.93
5.4.30.0170.04211.93
5.4.20.0150.04511.94
5.4.10.0150.04311.94
5.4.00.0340.05311.43
5.3.290.0040.04012.80
5.3.280.0070.03612.70
5.3.270.0160.04712.72
5.3.260.0150.05012.71
5.3.250.0180.04312.72
5.3.240.0230.04012.72
5.3.230.0180.04712.71
5.3.220.0210.04312.68
5.3.210.0230.06912.68
5.3.200.0160.05112.68
5.3.190.0300.06112.67
5.3.180.0320.09512.67
5.3.170.0160.04812.67
5.3.160.0200.04312.68
5.3.150.0220.04212.67
5.3.140.0190.04312.66
5.3.130.0330.09112.66
5.3.120.0170.04412.66
5.3.110.0180.04712.66
5.3.100.0210.04412.11
5.3.90.0140.04412.08
5.3.80.0150.04612.07
5.3.70.0190.04212.07
5.3.60.0240.04512.06
5.3.50.0470.07912.00
5.3.40.0240.04212.00
5.3.30.0230.03911.94
5.3.20.0160.04811.71
5.3.10.0220.03711.68
5.3.00.0210.03911.66
5.2.170.0160.0349.18
5.2.160.0140.0369.18
5.2.150.0190.0639.18
5.2.140.0130.0369.18
5.2.130.0190.0349.14
5.2.120.0130.0349.14
5.2.110.0200.0319.14
5.2.100.0150.0359.14
5.2.90.0330.0779.14
5.2.80.0130.0359.13
5.2.70.0150.0369.13
5.2.60.0130.0359.09
5.2.50.0110.0379.05
5.2.40.0130.0359.04
5.2.30.0160.0329.01
5.2.20.0330.0469.00
5.2.10.0120.0368.92
5.2.00.0130.0338.78
5.1.60.0140.0268.07
5.1.50.0140.0278.06
5.1.40.0140.0308.05
5.1.30.0110.0338.40
5.1.20.0100.0348.43
5.1.10.0110.0328.14
5.1.00.0220.0508.14
5.0.50.0120.0236.62
5.0.40.0050.0286.48
5.0.30.0100.0366.30
5.0.20.0120.0216.29
5.0.10.0060.0266.27
5.0.00.0120.0336.25
4.4.90.0070.0184.78
4.4.80.0080.0174.76
4.4.70.0050.0204.75
4.4.60.0070.0194.75
4.4.50.0060.0194.77
4.4.40.0060.0304.71
4.4.30.0280.0584.76
4.4.20.0050.0204.84
4.4.10.0090.0204.85
4.4.00.0060.0334.76
4.3.110.0070.0174.67
4.3.100.0090.0154.67
4.3.90.0050.0194.64
4.3.80.0040.0314.58
4.3.70.0090.0154.63
4.3.60.0070.0204.63
4.3.50.0070.0184.63
4.3.40.0210.0454.54
4.3.30.0060.0183.32
4.3.20.0050.0193.30
4.3.10.0050.0183.27
4.3.00.0030.0207.69

preferences:
44.63 ms | 401 KiB | 5 Q