3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $locales = array( 'en_GB', 'en-GB', 'en', 'es_ES@EURO', 'es_ES@UTF-8', ); foreach($locales as $locale) { var_dump(locale_canonicalize($locale)); }
Output for 5.4.0 - 5.4.45, 5.6.0 - 7.1.0
string(5) "en_GB" string(5) "en_GB" string(2) "en" string(18) "es_ES@currency=EUR" string(11) "es_ES_UTF_8"
Output for 5.0.0 - 5.3.29, 5.5.0 - 5.5.38
Fatal error: Call to undefined function locale_canonicalize() in /in/rA0qh on line 12
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: locale_canonicalize() in /in/rA0qh on line 12
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: locale_canonicalize() in /in/rA0qh on line 12
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: locale_canonicalize() in /in/rA0qh on line 12