php-src/Zend/tests/bug18556.phpt

38 lines
752 B
Plaintext
Raw Normal View History

2012-07-11 04:47:56 +00:00
--TEST--
Bug #18556 (Setting locale to 'tr_TR' lowercases class names)
--FILE--
<?php
$g_lang = 'tr_TR';
2018-09-16 17:16:42 +00:00
putenv("LANG=$g_lang");
2012-07-11 04:47:56 +00:00
setlocale(LC_ALL, $g_lang);
class InfoBlob {
var $foo;
2015-03-31 14:10:22 +00:00
function __construct() {
2012-07-11 04:47:56 +00:00
$this->foo = "Foo";
}
}
echo "Instantiating an infoBlob with a lowercase i\n";
$foobar = new infoBlob();
echo $foobar->foo;
echo "\nInstantiating an InfoBlob with an uppercase I\n";
$foobar = new InfoBlob();
echo $foobar->foo;
echo "\n";
setlocale(LC_ALL, "tr_TR.utf8");
foreach(get_declared_classes() as $class)
{
2020-02-03 21:52:20 +00:00
if(!class_exists($class))
echo "$class No Longer Exists!\n";
2012-07-14 22:03:51 +00:00
2012-07-11 04:47:56 +00:00
}
echo "Done.\n";
?>
--EXPECT--
Instantiating an infoBlob with a lowercase i
Foo
Instantiating an InfoBlob with an uppercase I
Foo
Done.