3v4l.org

run code in 200+ PHP versions simultaneously
<?php var_dump(Locale::setDefault('nonsense')); var_dump(Locale::getDefault()); var_dump(ini_get('intl.default_locale')); var_dump(ini_set('intl.default_locale', 'nonsense2')); var_dump(Locale::getDefault()); var_dump(ini_get('intl.default_locale'));
based on ZS0RA
Output for 5.5.17, 5.6.0 - 7.4.0
bool(true) string(8) "nonsense" string(8) "nonsense" string(8) "nonsense" string(9) "nonsense2" string(9) "nonsense2"
Output for 5.0.0 - 5.5.16, 5.5.18 - 5.5.26
Fatal error: Class 'Locale' not found in /in/A3ooa on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Undefined class name 'locale' in /in/A3ooa on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Undefined class name 'locale' in /in/A3ooa on line 3