3v4l.org

run code in 300+ PHP versions simultaneously
<?php $locales = array( 'en_US', 'en_GB', 'es_AR', 'es_ES', 'fr_FR', 'de_DE', 'he_IL', ); $styles = array( NumberFormatter::DECIMAL, NumberFormatter::CURRENCY, ); foreach ($locales as $locale) { foreach ($styles as $style) { echo "$locale -- $style\n"; $formatter = new NumberFormatter($locale, $style); var_dump($formatter->format(100)); var_dump($formatter->format(100.00)); var_dump($formatter->format('100')); var_dump($formatter->format('not a number')); var_dump($formatter->format(true)); var_dump($formatter->format(false)); var_dump($formatter->format(array())); var_dump($formatter->format(array(5))); } } $formatter = new NumberFormatter('en_GB', NumberFormatter::PATTERN_DECIMAL); var_dump($formatter->format('123456'));

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.0040.01518.75
8.3.50.0130.00823.92
8.3.40.0120.00320.18
8.3.30.0030.01320.51
8.3.20.0040.00421.50
8.3.10.0080.00024.91
8.3.00.0100.00021.13
8.2.180.0130.00320.29
8.2.170.0110.00722.96
8.2.160.0110.00321.72
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0140.00726.16
8.2.120.0050.00322.90
8.2.110.0060.00323.58
8.2.100.0040.00819.84
8.2.90.0090.00620.50
8.2.80.0040.00419.21
8.2.70.0080.00419.00
8.2.60.0060.00619.43
8.2.50.0110.00319.38
8.2.40.0040.00819.66
8.2.30.0050.00319.82
8.2.20.0060.00619.38
8.2.10.0080.00019.80
8.2.00.0000.00919.61
8.1.280.0280.00625.92
8.1.270.0040.00425.48
8.1.260.0000.00826.35
8.1.250.0000.00828.09
8.1.240.0050.00523.35
8.1.230.0080.00421.09
8.1.220.0000.00819.53
8.1.210.0000.00919.29
8.1.200.0060.00319.10
8.1.190.0030.00918.98
8.1.180.0070.00318.97
8.1.170.0070.00420.27
8.1.160.0040.00423.38
8.1.150.0090.00320.26
8.1.140.0080.00019.20
8.1.130.0000.00719.63
8.1.120.0070.00019.56
8.1.110.0030.00619.52
8.1.100.0070.00719.04
8.1.90.0130.00019.43
8.1.80.0070.00719.13
8.1.70.0050.00519.34
8.1.60.0090.00319.68
8.1.50.0030.00619.51
8.1.40.0080.00419.07
8.1.30.0080.00019.66
8.1.20.0030.00619.58
8.1.10.0000.00819.46
8.1.00.0100.00019.26
8.0.300.0000.00819.16
8.0.290.0080.00018.63
8.0.280.0000.00819.87
8.0.270.0090.00019.00
8.0.260.0000.00719.00
8.0.250.0050.00218.91
8.0.240.0110.00018.81
8.0.230.0030.00618.71
8.0.220.0000.00718.77
8.0.210.0060.00618.63
8.0.200.0050.00518.81
8.0.190.0170.00318.85
8.0.180.0120.00618.73
8.0.170.0080.00018.67
8.0.160.0060.00318.59
8.0.150.0110.00418.54
8.0.140.0100.00718.67
8.0.130.0030.00313.50
8.0.120.0030.00518.84
8.0.110.0000.00718.89
8.0.100.0040.00419.04
8.0.90.0000.00818.83
8.0.80.0170.00719.03
8.0.70.0040.00418.48
8.0.60.0000.00818.99
8.0.50.0040.00418.79
8.0.30.0140.00719.11
8.0.20.0180.00218.90
8.0.10.0000.00819.15
8.0.00.0170.00818.78
7.4.330.0050.00015.13
7.4.320.0080.00019.41
7.4.300.0020.00719.48
7.4.290.0110.00319.22
7.4.280.0120.00619.23
7.4.270.0030.00519.33
7.4.260.0080.00419.27
7.4.250.0060.00619.43
7.4.240.0020.00719.36
7.4.230.0100.00019.30
7.4.220.0210.00919.60
7.4.210.0070.02119.48
7.4.200.0070.00219.54
7.4.160.0060.01619.27
7.4.150.0270.01319.18
7.4.140.0250.00219.13
7.4.130.0170.01319.12
7.4.120.0120.01519.16
7.4.110.0160.01319.16
7.4.100.0200.00319.06
7.4.90.0140.01419.27
7.4.80.0130.01619.39
7.4.70.0190.00819.06
7.4.60.0190.01319.07
7.4.50.0000.00619.07
7.4.40.0130.00919.11
7.4.30.0120.01919.00
7.4.00.0100.01117.77
7.3.330.0040.00413.18
7.3.320.0000.00613.07
7.3.310.0060.00318.94
7.3.300.0090.00019.13
7.3.290.0090.01519.13
7.3.280.0120.00919.12
7.3.270.0140.00719.39
7.3.260.0190.01619.17
7.3.250.0200.01119.06
7.3.240.0230.01519.13
7.3.230.0170.00819.09
7.3.210.0190.00919.05
7.3.200.0120.01219.39
7.3.190.0180.00719.31
7.3.180.0150.01219.48
7.3.170.0110.01419.13
7.3.160.0180.00718.86
7.3.120.0060.01317.48
7.3.110.0090.00917.41
7.3.100.0080.00917.56
7.3.90.0060.01017.63
7.3.80.0060.01017.85
7.3.70.0070.01017.56
7.3.60.0080.00817.46
7.3.50.0080.00617.57
7.3.40.0060.00917.58
7.3.30.0020.01017.48
7.3.20.0030.01219.20
7.3.10.0050.01219.10
7.3.00.0070.00619.28
7.2.330.0150.01219.47
7.2.320.0140.01419.31
7.2.310.0220.01319.53
7.2.300.0240.00819.02
7.2.290.0230.00719.27
7.2.250.0140.01017.73
7.2.240.0090.01117.83
7.2.230.0070.01217.92
7.2.220.0070.01217.75
7.2.210.0090.00917.90
7.2.200.0070.00717.69
7.2.190.0050.01117.77
7.2.180.0070.00817.67
7.2.170.0080.00917.79
7.2.160.0060.00917.89
7.2.150.0030.01019.93
7.2.140.0030.00719.81
7.2.130.0000.01419.46
7.2.120.0030.01019.60
7.2.110.0000.01319.61
7.2.100.0030.00719.46
7.2.90.0030.00719.61
7.2.80.0060.00919.44
7.2.70.0000.01419.84
7.2.60.0120.00619.78
7.2.50.0100.00319.35
7.2.40.0090.00619.76
7.2.30.0070.01019.75
7.2.20.0080.00419.41
7.2.10.0040.01119.45
7.2.00.0060.01521.00
7.1.330.0080.00718.32
7.1.320.0060.00918.50
7.1.310.0060.00818.52
7.1.300.0090.00718.37
7.1.290.0050.00918.43
7.1.280.0080.00618.41
7.1.270.0070.00718.33
7.1.260.0020.01518.51
7.1.250.0070.01118.41
7.1.200.0060.00618.45
7.1.100.0160.00320.96
7.1.70.0000.01120.36
7.1.60.0270.00720.01
7.1.50.0130.01720.05
7.1.00.0000.08325.33
7.0.200.0070.00719.83
7.0.140.0100.07025.02
7.0.60.0070.09022.61
7.0.50.0030.06317.83
7.0.40.0030.04322.41
7.0.30.0170.05722.68
7.0.20.0300.04722.88
7.0.10.0070.09322.68
7.0.00.0070.06022.54
5.6.280.0030.07723.79
5.6.210.0070.08723.28
5.6.200.0070.08718.15
5.6.190.0070.04323.08
5.6.180.0430.07723.09
5.6.170.0270.07022.83
5.6.160.0030.04322.79
5.6.150.0000.04718.18
5.6.140.0100.04318.20
5.6.130.0000.06718.11
5.6.120.0070.04723.39
5.6.110.0170.05323.67
5.6.100.0200.07323.64
5.6.90.0070.07023.68
5.6.80.0030.07723.07
5.5.350.0300.07722.98
5.5.340.0100.03017.88
5.5.330.0130.08323.15
5.5.320.0430.07022.64
5.5.310.0200.04722.82
5.5.300.0070.03718.00
5.5.290.0030.06717.86
5.5.280.0100.06323.16
5.5.270.0070.05323.39
5.5.260.0230.07023.64
5.5.250.0070.08723.32
5.5.240.0330.06722.58
5.4.450.0230.04321.79
5.4.440.0370.05721.92
5.4.430.0330.04721.74
5.4.420.0300.04321.91
5.4.410.1000.04321.54
5.4.400.0400.04021.43
5.4.390.0070.05321.45
5.4.380.0500.05321.11
5.4.370.0470.04321.30
5.4.360.0300.05321.19
5.4.350.0330.05721.32
5.4.340.0300.05321.33
5.4.320.0070.04912.47
5.4.310.0150.04412.46
5.4.300.0050.04812.47
5.4.290.0070.05312.46
5.4.280.0120.04812.36
5.4.270.0070.05212.36
5.4.260.0110.04812.36
5.4.250.0060.05212.36
5.4.240.0060.05212.36
5.4.230.0100.04212.36
5.4.220.0090.04812.35
5.4.210.0110.04512.36
5.4.200.0050.05112.35
5.4.190.0070.05212.35
5.4.180.0070.04012.35
5.4.170.0070.03812.36
5.4.160.0060.03712.36
5.4.150.0070.03712.35
5.4.140.0050.04612.04
5.4.130.0080.03312.02
5.4.120.0070.03411.98
5.4.110.0060.03611.98
5.4.100.0110.04211.98
5.4.90.0080.03711.98
5.4.80.0060.03811.98
5.4.70.0070.04111.97
5.4.60.0100.04711.98
5.4.50.0040.04011.98
5.4.40.0040.03711.97
5.4.30.0060.04911.96
5.4.20.0070.03411.96
5.4.10.0060.03411.97
5.4.00.0040.03911.45
5.3.290.0060.03912.80
5.3.280.0060.03812.71
5.3.270.0050.04712.73
5.3.260.0070.03712.72
5.3.250.0040.03912.72
5.3.240.0050.03812.72
5.3.230.0070.03712.71
5.3.220.0040.03912.68
5.3.210.0050.04012.68
5.3.200.0070.03612.68
5.3.190.0050.03812.68
5.3.180.0040.03812.67
5.3.170.0080.04012.67
5.3.160.0040.04012.68
5.3.150.0060.04012.68
5.3.140.0060.03812.66
5.3.130.0100.04412.66
5.3.120.0030.04212.66
5.3.110.0050.04112.66
5.3.100.0110.03812.12
5.3.90.0090.03812.08
5.3.80.0100.03512.07
5.3.70.0080.03612.07
5.3.60.0050.03812.07
5.3.50.0050.03712.00
5.3.40.0040.03912.00
5.3.30.0060.04911.96
5.3.20.0060.03511.75
5.3.10.0050.03611.71
5.3.00.0080.03411.69
5.2.170.0080.0409.20
5.2.160.0060.0339.20
5.2.150.0050.0319.20
5.2.140.0030.0359.19
5.2.130.0080.0379.16
5.2.120.0090.0379.16
5.2.110.0040.0319.16
5.2.100.0040.0299.16
5.2.90.0080.0269.16
5.2.80.0040.0319.16
5.2.70.0060.0309.15
5.2.60.0050.0319.11
5.2.50.0030.0329.07
5.2.40.0060.0289.05
5.2.30.0040.0309.03
5.2.20.0060.0389.02
5.2.10.0090.0358.94
5.2.00.0050.0428.80
5.1.60.0080.0318.09
5.1.50.0070.0318.07
5.1.40.0060.0268.06
5.1.30.0070.0318.41
5.1.20.0020.0308.43
5.1.10.0040.0278.16
5.1.00.0040.0258.16
5.0.50.0060.0186.64
5.0.40.0060.0176.50
5.0.30.0040.0316.31
5.0.20.0060.0256.30
5.0.10.0050.0276.29
5.0.00.0040.0376.28
4.4.90.0030.0194.78
4.4.80.0020.0164.75
4.4.70.0050.0204.76
4.4.60.0050.0174.76
4.4.50.0050.0204.77
4.4.40.0020.0294.71
4.4.30.0050.0144.76
4.4.20.0020.0164.85
4.4.10.0030.0194.85
4.4.00.0040.0314.76
4.3.110.0030.0174.67
4.3.100.0010.0174.66
4.3.90.0030.0164.63
4.3.80.0040.0254.58
4.3.70.0030.0164.63
4.3.60.0040.0154.62
4.3.50.0040.0164.63
4.3.40.0030.0254.54
4.3.30.0020.0223.29
4.3.20.0030.0203.27
4.3.10.0020.0213.23
4.3.00.0030.01715.64

preferences:
39.7 ms | 400 KiB | 5 Q