Mantis - Quercus
Viewing Issue Advanced Details
4071 major always 06-08-10 08:48 06-08-10 08:48
sblommers Linux  
Ubuntu  
normal 10.04  
new 4.0.8  
open  
none    
none  
0004071: Creating array with "string" as key dissappears
When creating array(null => 1, false => 2, true => 3, 4.6 => 4, "08" => 5, "8" => 6);

"08" seems to dissapear.
<?php
$array = array(null => 1, false => 2, true => 3, 4.6 => 4, "08" => 5, "8" => 6);
var_export($array);
var_dump($array);

echo count($array);

echo "
null is " . (array_key_exists(null, $array) ? '' : 'not ') . "a key.\n";
echo '
false is ' . (array_key_exists(false, $array) ? '' : 'not ') . "a key.\n";
echo '
true is ' . (array_key_exists(true, $array) ? '' : 'not ') . "a key.\n";
echo '
4.6 is ' . (array_key_exists(4.6, $array) ? '' : 'not ') . "a key.\n";
echo '
"08" is ' . (array_key_exists("08", $array) ? '' : 'not ') . "a key.\n";
echo '
"8" is ' . (array_key_exists("8", $array) ? '' : 'not ') . "a key.\n";
?>

There are no notes attached to this issue.