3v4l.org

run code in 300+ PHP versions simultaneously
<?php $locales = [ 'en_US', 'es_ES', ]; $data = [ '1.234.567,891', '1,234,567.891', '1.23E987', 'Five', ]; foreach ($locales as $locale) { $fmt = new NumberFormatter($locale, NumberFormatter::DECIMAL); foreach ($data as $input) { $parsed = $fmt->parse($input); printf("In %s '%s' is %s (%s)\n", $locale, $input, $parsed ?: 'not a number', $fmt->getErrorMessage()); } }

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.5.10.0070.01116.69
8.5.00.0100.01523.57
8.4.160.0150.00927.29
8.4.150.0020.00014.05
8.4.140.0090.02620.53
8.4.130.0160.01820.49
8.4.120.0140.01923.36
8.4.110.0130.02220.88
8.4.100.0110.02420.33
8.4.90.0040.01023.64
8.4.80.0070.00723.79
8.4.70.0150.02025.50
8.4.60.0130.02423.70
8.4.50.0110.02621.52
8.4.40.0190.01922.42
8.4.30.0160.02222.07
8.4.20.0080.00823.16
8.4.10.0070.01020.68
8.3.280.0120.01121.98
8.3.270.0070.00919.57
8.3.260.0070.00819.32
8.3.250.0100.02319.38
8.3.240.0120.02219.31
8.3.230.0100.02219.62
8.3.220.0110.02021.66
8.3.210.0130.01919.75
8.3.200.0050.01119.65
8.3.190.0030.01319.80
8.3.180.0050.01322.00
8.3.170.0090.02221.91
8.3.160.0090.01921.44
8.3.150.0100.01720.14
8.3.140.0060.00923.66
8.3.130.0150.01821.26
8.3.120.0030.01323.56
8.3.110.0070.01021.04
8.3.100.0170.02024.06
8.3.90.0090.00626.77
8.3.80.0000.01819.38
8.3.70.0190.02219.28
8.3.60.0210.02121.36
8.3.50.0130.02321.34
8.3.40.0120.00320.34
8.3.30.0080.00820.34
8.3.20.0040.00422.52
8.3.10.0050.00325.11
8.3.00.0080.00025.46
8.2.290.0100.02319.61
8.2.280.0140.01723.06
8.2.270.0130.02319.28
8.2.260.0070.02820.18
8.2.250.0140.00619.61
8.2.240.0130.00920.07
8.2.230.0030.01622.58
8.2.220.0080.00837.54
8.2.210.0060.00926.77
8.2.200.0040.01421.04
8.2.190.0070.02123.27
8.2.180.0070.02321.23
8.2.170.0090.01222.96
8.2.160.0040.01121.85
8.2.150.0090.00924.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0030.00521.56
8.2.110.0100.00021.19
8.2.100.0080.00319.59
8.2.90.0030.00519.78
8.2.80.0040.00419.50
8.2.70.0000.00819.50
8.2.60.0000.01419.80
8.2.50.0040.00419.50
8.2.40.0000.00819.79
8.2.30.0040.00419.86
8.2.20.0040.00419.89
8.2.10.0050.00320.73
8.2.00.0030.00521.39
8.1.330.0080.02619.02
8.1.320.0070.02419.39
8.1.310.0090.01919.65
8.1.300.0070.02119.18
8.1.290.0030.01430.84
8.1.280.0130.01625.92
8.1.270.0000.00920.41
8.1.260.0060.00326.35
8.1.250.0060.00328.09
8.1.240.0030.00624.09
8.1.230.0040.00822.77
8.1.220.0000.00819.53
8.1.210.0080.00520.77
8.1.200.0060.00319.10
8.1.190.0100.00019.10
8.1.180.0080.00019.27
8.1.170.0040.00420.41
8.1.160.0040.00420.37
8.1.150.0000.00820.51
8.1.140.0000.00823.83
8.1.130.0000.00721.79
8.1.120.0040.00419.50
8.1.110.0000.00819.43
8.1.100.0030.00619.54
8.1.90.0040.00419.41
8.1.80.0030.00519.52
8.1.70.0050.00219.26
8.1.60.0040.00419.62
8.1.50.0030.00519.42
8.1.40.0030.00619.50
8.1.30.0000.00919.75
8.1.20.0050.00319.67
8.1.10.0050.00319.56
8.1.00.0000.00819.44
8.0.300.0000.00921.33
8.0.290.0110.00318.63
8.0.280.0000.00720.02
8.0.270.0050.00318.64
8.0.260.0000.00719.90
8.0.250.0050.00318.82
8.0.240.0030.00618.91
8.0.230.0040.00418.86
8.0.220.0090.00018.79
8.0.210.0030.00518.81
8.0.200.0040.00418.89
8.0.190.0060.00318.84
8.0.180.0040.00418.89
8.0.170.0070.00318.85
8.0.160.0050.00318.71
8.0.150.0040.00418.75
8.0.140.0060.00318.86
8.0.130.0030.00313.41
8.0.120.0030.00618.88
8.0.110.0040.00418.92
8.0.100.0040.00419.13
8.0.90.0000.00718.89
8.0.80.0090.01418.99
8.0.70.0050.00318.85
8.0.60.0060.00318.83
8.0.50.0040.00418.89
8.0.30.0140.00519.00
8.0.20.0030.01618.81
8.0.10.0040.00419.01
8.0.00.0120.00718.85
7.4.330.0000.00516.86
7.4.320.0000.00718.70
7.4.300.0000.00718.53
7.4.290.0040.00418.46
7.4.280.0050.00318.61
7.4.270.0050.00318.58
7.4.260.0040.00418.62
7.4.250.0070.00018.60
7.4.240.0060.00418.66
7.4.230.0050.00218.83
7.4.220.0090.00018.44
7.4.210.0020.01418.71
7.4.200.0040.00418.82
7.4.160.0100.00818.53
7.4.140.0090.01018.58
7.4.130.0110.00718.42
7.4.120.0190.00318.45
7.4.110.0200.01018.38
7.4.100.0130.01018.22
7.4.90.0150.00918.25
7.4.80.0170.00019.39
7.4.70.0150.00818.46
7.4.60.0200.01018.64
7.4.50.0070.00718.19
7.4.40.0180.00618.48
7.4.00.0070.00717.05
7.3.330.0030.00313.07
7.3.320.0000.00513.07
7.3.310.0080.00018.48
7.3.300.0040.00418.25
7.3.290.0040.00418.31
7.3.280.0140.00718.39
7.3.260.0120.00918.51
7.3.240.0120.00818.61
7.3.230.0060.01118.27
7.3.210.0070.01018.62
7.3.200.0150.00318.59
7.3.190.0070.01018.63
7.3.180.0190.01018.47
7.3.170.0000.01818.48
7.3.160.0120.00618.55
7.3.00.0340.00517.39
7.2.330.0150.00618.43
7.2.320.0060.01318.60
7.2.310.0070.01018.74
7.2.300.0210.00718.55
7.2.290.0130.01018.63
7.2.130.0520.00716.94
7.2.120.0560.00716.71
7.2.110.0680.00616.82
7.2.100.0370.01017.10
7.2.90.0270.01416.94
7.2.80.0560.00716.98
7.2.70.0450.01317.13
7.2.60.0410.00316.79
7.2.50.0440.00617.12
7.2.40.0550.01317.01
7.2.30.0590.00917.01
7.2.20.0520.01016.81
7.2.10.0590.01016.98
7.2.00.0580.01017.09
7.1.250.0450.01016.16
7.0.330.0590.00615.54
5.6.380.0110.00416.20

preferences:
162.35 ms | 403 KiB | 5 Q