I am using php map for storing values in array map but when i increase the value for key, value of other key gets increased automatically.
Error while calculating
$myhashmap = array();
$myhashmap[0.2] = 1;
$myhashmap[0.1] = 2;
$myhashmap[0.1]++;
echo $myhashmap[0.1]."\n"; // 3 expected
$myhashmap[0.2]++;
echo $myhashmap[0.1]."\n"; // 4 unexpected
Like in above case in line6, i am increasing values corresponding to 0.2 but value corresponding to 0.1 gets increased. How can i fix this error?