3v4l.org

run code in 500+ PHP versions simultaneously
<?php print "No keywords return: "; var_dump(Locale::getKeywords('en')); print "\nNo locale specified use the default, which doesn't usually have keywords. Returns: "; var_dump(Locale::getKeywords('')); print "\nBut it could, so worth mentioning the argument default. Returns: "; Locale::setDefault('sl-Latn-IT-nedis@currency=EUR;collation=PHONEBOOK'); var_dump(Locale::getKeywords('')); print "\nThe INTL_MAX_LOCALE_LEN is: " . INTL_MAX_LOCALE_LEN; $long_locale = 'sl-Latn-IT-nedis@currency=EUR;collation=PHONEBOOK;calendar=islamic-umalqura;numbers=hansfin;foo=lorumipsumsedutperspiciatisundeomnisistenatuserrorsitlorumip'; print "\nSo a string of " . strlen($long_locale) . " returns: "; var_dump(Locale::getKeywords($long_locale)); $longer_locale = 'sl-Latn-IT-nedis@currency=EUR;collation=PHONEBOOK;calendar=islamic-umalqura;numbers=hansfin;foo=lorumipsumsedutperspiciatisundeomnisistenatuserrorsitlorumips'; print "But a string of " . strlen($longer_locale) . " returns: "; var_dump(Locale::getKeywords($longer_locale)); $keyword = 'lorumipsumsedutperspiciatisundeomnisistenatuserrorsitlorumipslorumipsumsedutperspiciatisundeomnisistenatuserrorsit'; print "\nJust one keyword value with a max length longer than 100? (" . strlen($keyword) . ") Returns: "; $keyword_locale = 'sl-Latn-IT-nedis@cfoo=' . $keyword; var_dump(Locale::getKeywords($keyword_locale)); print "\nJust one keyword key with a max length longer than 100? (" . strlen($keyword) . ") Returns: "; $keyword_locale = 'sl-Latn-IT-nedis@' . $keyword . '=foo'; var_dump(Locale::getKeywords($keyword_locale));

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.80.0070.00216.98
8.5.70.0220.00716.88
8.5.60.0180.00416.93
8.5.50.0160.00216.58
8.5.40.0210.00616.59
8.5.30.0230.00416.57
8.5.20.0210.00716.71
8.5.10.0170.00916.71
8.5.00.0060.00416.75
8.4.230.0050.00423.00
8.4.220.0060.00520.30
8.4.210.0140.00519.85
8.4.200.0180.00420.36
8.4.190.0140.00620.26
8.4.180.0150.00620.22
8.4.170.0140.00620.35
8.4.160.0150.00420.15
8.4.150.0160.00420.15
8.4.140.0140.00417.71
8.4.130.0200.00417.61
8.4.120.0170.00517.90
8.4.110.0160.00417.71
8.4.100.0170.00417.97
8.4.90.0150.00717.89
8.4.80.0190.00517.97
8.4.70.0170.00317.90
8.4.60.0170.00517.75
8.4.50.0160.00517.75
8.4.40.0160.00817.94
8.4.30.0170.00417.80
8.4.20.0170.00317.97
8.4.10.0150.00517.85
8.3.320.0130.01019.35
8.3.310.0160.00319.19
8.3.300.0140.00419.10
8.3.290.0150.00418.96
8.3.280.0140.00519.03
8.3.270.0160.00416.81
8.3.260.0150.00316.87
8.3.250.0150.00516.93
8.3.240.0170.00416.83
8.3.230.0210.00516.94
8.3.220.0150.00416.78
8.3.210.0150.00316.79
8.3.200.0170.00416.80
8.3.190.0180.00616.71
8.3.180.0120.00617.01
8.3.170.0180.00216.67
8.3.160.0160.00416.94
8.3.150.0170.00516.78
8.3.140.0140.00516.75
8.3.130.0150.00316.92
8.3.120.0150.00317.05
8.3.110.0140.00316.84
8.3.100.0170.00316.89
8.3.90.0140.00516.90
8.3.80.0160.00416.86
8.3.70.0150.00516.87
8.3.60.0160.00316.87
8.3.50.0170.00416.99
8.3.40.0140.00518.07
8.3.30.0110.00518.07
8.3.20.0110.00518.14
8.3.10.0110.00618.26
8.3.00.0130.00418.10
8.2.320.0110.00918.90
8.2.310.0190.00518.92
8.2.300.0160.00418.80
8.2.290.0100.00517.02
8.2.280.0120.00516.70
8.2.270.0150.00816.66
8.2.260.0110.00516.98
8.2.250.0150.00316.78
8.2.240.0130.00316.84
8.2.230.0150.00416.82
8.2.220.0130.00516.92
8.2.210.0130.00416.73
8.2.200.0110.00516.84
8.2.190.0100.00816.90
8.2.180.0110.00416.80
8.2.170.0130.00218.42
8.2.160.0140.00318.02
8.2.150.0110.00418.34
8.2.140.0110.00418.04
8.2.130.0110.00518.29
8.2.120.0130.00118.11
8.2.110.0110.00418.23
8.2.100.0120.00218.46
8.2.90.0140.00318.46
8.2.80.0070.00918.27
8.2.70.0270.00917.93
8.2.60.0300.00818.18
8.2.50.0280.00718.17
8.2.40.0350.00618.18
8.2.30.0270.00818.18
8.2.20.0280.00818.34
8.2.10.0300.00718.20
8.2.00.0260.00918.25
8.1.340.0340.00818.12
8.1.330.0270.00816.49
8.1.320.0280.00616.48
8.1.310.0280.00916.30
8.1.300.0260.01316.27
8.1.290.0230.00916.61
8.1.280.0140.00716.49
8.1.270.0250.00717.96
8.1.260.0270.00718.22
8.1.250.0280.00817.99
8.1.240.0260.01118.16
8.1.230.0270.01218.10
8.1.220.0280.00818.23
8.1.210.0260.00918.17
8.1.200.0250.01018.16
8.1.190.0290.00617.93
8.1.180.0270.01017.92
8.1.170.0300.01018.05
8.1.160.0260.01018.03
8.1.150.0280.00818.19
8.1.140.0280.01018.14
8.1.130.0220.00818.24
8.1.120.0220.00918.15
8.1.110.0320.00918.13
8.1.100.0310.00718.11
8.1.90.0280.00918.15
8.1.80.0240.01617.94
8.1.70.0360.00818.00
8.1.60.0260.01218.21
8.1.50.0220.00418.21
8.1.40.0170.00618.19
8.1.30.0090.00718.30
8.1.20.0180.00818.31
8.1.10.0250.00618.11
8.1.00.0190.00417.82
8.0.300.0190.00617.26
8.0.290.0170.00517.24
8.0.280.0230.00517.26
8.0.270.0190.00217.23
8.0.260.0140.00617.38
8.0.250.0150.00317.36
8.0.240.0180.00617.41
8.0.230.0180.00417.34
8.0.220.0090.00817.11
8.0.210.0100.00517.20
8.0.200.0140.00317.02
8.0.190.0140.00217.28
8.0.180.0100.00517.54
8.0.170.0140.00417.16
8.0.160.0150.00117.39
8.0.150.0120.00417.11
8.0.140.0110.00417.30
8.0.130.0070.00917.15
8.0.120.0130.00417.18
8.0.110.0120.00117.03
8.0.100.0090.00617.18
8.0.90.0130.00217.02
8.0.80.0110.00417.43
8.0.70.0150.00617.17
8.0.60.0140.00117.06
8.0.50.0120.00516.93
8.0.30.0090.00817.27
8.0.20.0170.00017.11
8.0.10.0100.00417.11
8.0.00.0120.00317.22
7.4.330.0120.00316.90
7.4.320.0170.00417.02
7.4.300.0160.00416.87
7.4.290.0150.00516.91
7.4.280.0170.00316.91
7.4.270.0150.00316.91
7.4.260.0120.00316.93
7.4.250.0080.00617.02
7.4.240.0160.00816.95
7.4.230.0160.00916.83
7.4.220.0150.00716.89
7.4.210.0120.00316.96
7.4.200.0140.00617.05
7.4.190.0130.00217.01
7.4.180.0100.00416.88
7.4.160.0120.00216.79
7.4.150.0140.00216.77
7.4.140.0120.00416.77
7.4.130.0130.00116.76
7.4.120.0100.00416.54
7.4.110.0110.00616.90
7.4.100.0130.00116.71
7.4.90.0090.00416.66
7.4.80.0110.00417.03
7.4.70.0170.00416.60
7.4.60.0110.00316.98
7.4.50.0140.00416.68
7.4.40.0190.00516.68
7.4.30.0160.00116.85
7.4.20.0110.00416.62
7.4.10.0120.00416.70
7.4.00.0120.00416.71
7.3.330.0140.00316.87
7.3.320.0130.00316.65
7.3.310.0210.00116.75
7.3.300.0110.00516.69
7.3.290.0130.00216.84
7.3.280.0100.00516.70
7.3.270.0140.00216.75
7.3.260.0210.00416.55
7.3.250.0190.00316.93
7.3.240.0200.00516.75
7.3.230.0160.00116.58
7.3.220.0180.00416.58
7.3.210.0130.00316.71
7.3.200.0140.00916.74
7.3.190.0110.00416.62
7.3.180.0110.00316.71
7.3.170.0100.00416.61
7.3.160.0130.00216.80
7.3.150.0100.00316.72
7.3.140.0110.00316.65
7.3.130.0120.00316.62
7.3.120.0140.00216.91
7.3.110.0100.00416.80
7.3.100.0070.00616.37
7.3.90.0090.00717.11
7.3.80.0090.00616.54
7.3.70.0130.00116.90
7.3.60.0070.00816.83
7.3.50.0100.00317.05
7.3.40.0110.00216.77
7.3.30.0130.00316.59
7.3.20.0150.00118.74
7.3.10.0090.00518.32
7.3.00.0130.00218.66
7.2.340.0120.00216.64
7.2.330.0090.00516.77
7.2.320.0110.00216.77
7.2.310.0140.00516.47
7.2.300.0100.00516.68
7.2.290.0110.00416.89
7.2.280.0120.00216.74
7.2.270.0120.00216.75
7.2.260.0110.00216.64
7.2.250.0090.00516.89
7.2.240.0130.00316.96
7.2.230.0120.00216.90
7.2.220.0220.00616.74
7.2.210.0100.00516.80
7.2.200.0100.00417.03
7.2.190.0120.00916.90
7.2.180.0150.00516.93
7.2.170.0100.00417.03
7.2.160.0100.00417.09
7.2.150.0190.00418.68
7.2.140.0130.00318.94
7.2.130.0090.00418.97
7.2.120.0090.00518.54
7.2.110.0130.00218.86
7.2.100.0080.00518.86
7.2.90.0090.00518.83
7.2.80.0130.00318.96
7.2.70.0190.00718.92
7.2.60.0150.00518.86
7.2.50.0170.00318.83
7.2.40.0090.00518.95
7.2.30.0100.00318.89
7.2.20.0100.00518.81
7.2.10.0100.00418.97
7.2.00.0120.00119.06
7.1.330.0080.00717.67
7.1.320.0100.00317.79
7.1.310.0110.00317.60
7.1.300.0130.00117.88
7.1.290.0090.00317.54
7.1.280.0140.00417.59
7.1.270.0170.00217.61
7.1.260.0120.00317.68
7.1.250.0160.00517.55
7.1.240.0180.00317.59
7.1.230.0100.00617.51
7.1.220.0190.00317.65
7.1.210.0180.00617.57
7.1.200.0180.00617.66
7.1.190.0170.00717.73
7.1.180.0180.00917.54
7.1.170.0150.00717.43
7.1.160.0080.00517.77
7.1.150.0130.00117.76
7.1.140.0090.00317.76
7.1.130.0080.00717.64
7.1.120.0080.00717.72
7.1.110.0120.00417.64
7.1.100.0150.00517.72
7.1.90.0190.00517.60
7.1.80.0150.00417.78
7.1.70.0150.00617.47
7.1.60.0200.00617.54
7.1.50.0110.00517.69
7.1.40.0140.00217.61
7.1.30.0110.00317.62
7.1.20.0130.00317.61
7.1.10.0100.00317.80
7.1.00.0110.00317.64
7.0.330.0120.00217.13
7.0.320.0140.00417.38
7.0.310.0130.00417.22
7.0.300.0170.00217.24
7.0.290.0150.00317.50
7.0.280.0110.00317.37
7.0.270.0110.00717.40
7.0.260.0200.00517.48
7.0.250.0150.00917.51
7.0.240.0200.00517.56
7.0.230.0130.00217.65
7.0.220.0110.00217.51
7.0.210.0090.00417.50
7.0.200.0150.00417.56
7.0.190.0160.00417.48
7.0.180.0200.00317.51
7.0.170.0100.00917.60
7.0.160.0140.00017.14
7.0.150.0090.00517.45
7.0.140.0110.00317.28
7.0.130.0110.00417.81
7.0.120.0090.00417.50
7.0.110.0100.00317.26
7.0.100.0120.00317.13
7.0.90.0140.00317.26
7.0.80.0110.00217.41
7.0.70.0100.00317.35
7.0.60.0090.00417.48
7.0.50.0100.00417.24
7.0.40.0110.00317.30
7.0.30.0090.00517.48
7.0.20.0140.00617.29
7.0.10.0090.00517.55
7.0.00.0100.00417.39
5.6.400.0100.00316.30
5.6.390.0110.00316.29
5.6.380.0100.00316.30
5.6.370.0120.00116.55
5.6.360.0100.00316.27
5.6.350.0080.00616.27
5.6.340.0110.00216.37
5.6.330.0120.00216.49
5.6.320.0170.00216.14
5.6.310.0090.00316.30
5.6.300.0120.00116.23
5.6.290.0100.00316.36
5.6.280.0130.00116.25
5.6.270.0090.00416.25
5.6.260.0120.00216.29
5.6.250.0200.00016.22
5.6.240.0120.00416.16
5.6.230.0150.00416.32
5.6.220.0110.00316.39
5.6.210.0100.00616.26
5.6.200.0100.00416.35
5.6.190.0060.00616.35
5.6.180.0090.00516.29
5.6.170.0110.00216.39
5.6.160.0100.00216.41
5.6.150.0120.00216.22
5.6.140.0090.00416.36
5.6.130.0150.00316.34
5.6.120.0090.00516.28
5.6.110.0140.00816.41
5.6.100.0130.00316.11
5.6.90.0080.00716.43
5.6.80.0120.00116.36
5.6.70.0110.00216.52
5.6.60.0110.00216.52
5.6.50.0070.00616.16
5.6.40.0110.00216.38
5.6.30.0110.00316.25
5.6.20.0100.00416.20
5.6.10.0130.00416.39
5.6.00.0110.00416.08
5.5.380.0110.00416.38
5.5.370.0110.00416.38
5.5.360.0080.00616.34
5.5.350.0100.00316.19
5.5.340.0080.00516.20
5.5.330.0100.00316.27
5.5.320.0070.00615.96
5.5.310.0080.00516.37
5.5.300.0110.00216.06
5.5.290.0100.00416.15
5.5.280.0110.00316.25
5.5.270.0090.00416.25
5.5.260.0120.00216.00
5.5.250.0120.00216.50
5.5.240.0130.00215.96
5.5.230.0120.00516.05
5.5.220.0060.00516.29
5.5.210.0100.00316.25
5.5.200.0130.00116.25
5.5.190.0100.00316.31
5.5.180.0120.00616.05
5.5.170.0130.00416.12
5.5.160.0070.00616.37
5.5.150.0100.00416.25
5.5.140.0120.00116.09
5.5.130.0150.00416.06
5.5.120.0090.00415.84
5.5.110.0090.00416.15
5.5.100.0090.00316.09
5.5.90.0090.00316.37
5.5.80.0110.00216.37
5.5.70.0110.00116.06
5.5.60.0130.00116.37
5.5.50.0120.00516.43
5.5.40.0190.00416.16
5.5.30.0130.00716.33
5.5.20.0110.00316.40
5.5.10.0120.00716.02
5.5.00.0200.00416.29
5.4.450.0080.00214.02
5.4.440.0070.00314.02
5.4.430.0070.00314.02
5.4.420.0070.00314.02
5.4.410.0090.00114.02
5.4.400.0080.00214.02
5.4.390.0090.00114.02
5.4.380.0070.00314.02
5.4.370.0090.00314.02
5.4.360.0080.00414.02
5.4.350.0070.00314.02
5.4.340.0090.00114.02
5.4.330.0090.00214.02
5.4.320.0080.00314.02
5.4.310.0080.00314.02
5.4.300.0070.00414.02
5.4.290.0100.00014.02
5.4.280.0080.00214.02
5.4.270.0090.00214.02
5.4.260.0080.00314.02
5.4.250.0070.00314.02
5.4.240.0080.00314.02
5.4.230.0090.00114.02
5.4.220.0100.00114.02
5.4.210.0080.00214.02
5.4.200.0090.00214.02
5.4.190.0090.00214.02
5.4.180.0080.00414.02
5.4.170.0060.00414.02
5.4.160.0090.00214.02
5.4.150.0080.00214.02
5.4.140.0060.00414.02
5.4.130.0100.00114.02
5.4.120.0090.00314.02
5.4.110.0090.00114.02
5.4.100.0080.00314.02
5.4.90.0070.00314.02
5.4.80.0070.00314.02
5.4.70.0090.00214.02
5.4.60.0080.00214.02
5.4.50.0060.00314.02
5.4.40.0080.00314.02
5.4.30.0070.00414.02
5.4.20.0070.00114.02
5.4.10.0080.00314.02
5.4.00.0080.00214.02
5.3.290.0090.00214.02
5.3.280.0130.00514.02
5.3.270.0080.00314.02
5.3.260.0090.00414.02
5.3.250.0160.00314.02
5.3.240.0080.00214.02
5.3.230.0080.00214.02
5.3.220.0100.00314.02
5.3.210.0130.00514.02
5.3.200.0110.00514.02
5.3.190.0060.00514.02
5.3.180.0070.00414.02
5.3.170.0080.00214.02
5.3.160.0070.00514.02
5.3.150.0090.00314.02
5.3.140.0070.00414.02
5.3.130.0100.00214.02
5.3.120.0090.00414.02
5.3.110.0140.00614.02
5.3.100.0130.00314.02
5.3.90.0120.00414.02
5.3.80.0060.00414.02
5.3.70.0070.00314.02
5.3.60.0070.00314.02
5.3.50.0070.00314.02
5.3.40.0070.00314.02
5.3.30.0070.00414.02
5.3.20.0080.00214.02
5.3.10.0100.00414.02
5.3.00.0080.00214.02
5.2.170.0050.00314.02
5.2.160.0110.00314.02
5.2.150.0060.00114.02
5.2.140.0070.00114.02
5.2.130.0070.00214.02
5.2.120.0040.00314.02
5.2.110.0050.00314.02
5.2.100.0050.00214.02
5.2.90.0080.00214.02
5.2.80.0050.00414.02
5.2.70.0090.00614.02
5.2.60.0090.00414.02
5.2.50.0070.00714.02
5.2.40.0070.00114.02
5.2.30.0070.00014.02
5.2.20.0070.00214.02
5.2.10.0100.00314.02
5.2.00.0080.00514.02
5.1.60.0060.00014.02
5.1.50.0060.00314.02
5.1.40.0050.00214.02
5.1.30.0040.00214.02
5.1.20.0060.00114.02
5.1.10.0050.00214.02
5.1.00.0050.00214.02
5.0.50.0040.00114.02
5.0.40.0050.00014.02
5.0.30.0040.00214.02
5.0.20.0020.00314.02
5.0.10.0040.00314.02
5.0.00.0040.00214.02
4.4.90.0030.00114.02
4.4.80.0030.00014.02
4.4.70.0040.00014.02
4.4.60.0030.00014.02
4.4.50.0030.00114.02
4.4.40.0020.00114.02
4.4.30.0030.00114.02
4.4.20.0020.00114.02
4.4.10.0020.00214.02
4.4.00.0030.00014.02
4.3.110.0040.00014.02
4.3.100.0020.00114.02
4.3.90.0040.00014.02
4.3.80.0020.00214.02
4.3.70.0030.00014.02
4.3.60.0030.00014.02
4.3.50.0020.00214.02
4.3.40.0010.00314.02
4.3.30.0010.00214.02
4.3.20.0020.00214.02
4.3.10.0010.00114.02
4.3.00.0000.00314.02

preferences:
83.75 ms | 3127 KiB | 5 Q