- putenv: documentation ( source)
- setlocale: documentation ( source)
<?php
// https://bugs.php.net/bug.php?id=18556
// Set language to desired language
$g_lang = 'tr_TR';
putenv("LANG=$g_lang");
if (setlocale(LC_ALL, $g_lang) === false)
{
throw new Exception('Setting locale failed.');
}
class InfoBlob {
public $foo;
function InfoBlob() {
echo __CLASS__;
$this->foo = "Foo";
}
}
echo ('Instantiating an infoBlob with a lowercase i
');
$foobar = new infoBlob();
echo ($foobar->foo);
echo ('
Instantiating an InfoBlob with an uppercase I
');
$foobar = new InfoBlob();
echo ($foobar->foo);