PDA

View Full Version : unicode.semantics and getdate()


dicr
05-11-2011, 09:24 PM
I have folloing configuration:

<script-encoding>utf-8</script-encoding>
<unicode.semantics>on</unicode.semantics>
<unicode.runtime_encoding>utf-8</unicode.runtime_encoding>
<unicode.output_encoding>utf-8</unicode.output_encoding>
<unicode.http_input_encoding>utf-8</unicode.http_input_encoding>


Using following test code:

$date = getdate();
echo "<pre>";
var_dump($date);
echo "<hr>";
echo "Year: ".$date["year"];
echo "<hr>";
$date["year"] = 5;
var_dump($date);


Result:

array(11) {
["seconds"]=>
int(21)
["minutes"]=>
int(17)
["hours"]=>
int(0)
["mday"]=>
int(12)
["wday"]=>
int(4)
["mon"]=>
int(5)
["year"]=>
int(2011)
["yday"]=>
int(131)
["weekday"]=>
string(8) "Thursday"
["month"]=>
string(3) "May"
[0]=>
int(1305148641)
}
Year:
array(12) {
["seconds"]=>
int(21)
["minutes"]=>
int(17)
["hours"]=>
int(0)
["mday"]=>
int(12)
["wday"]=>
int(4)
["mon"]=>
int(5)
["year"]=>
int(2011)
["yday"]=>
int(131)
["weekday"]=>
string(8) "Thursday"
["month"]=>
string(3) "May"
[0]=>
int(1305148641)
["year"]=>
int(5)
}


$date["year"] is printed empty, but when I set $date['year'] = 5, then I got 2 keys 'year' in my array.

Is this a BUG ?