Kristina,
I believe i've found another bug. When retrieving documents that
constains arrays of integers, php driver display crazy values for
those integers. This is the code i used to generate some random
integers and save into a document:
<?
$connection = new Mongo();
$db = $connection->selectDB("test");
$users = array ();
$keys = array ();
$collection = $db->selectCollection("integers");
for ($i = 0; $i < 10; $i++)
{
$u = mt_rand(0, 10000);
$users[] = $u;
}
$collection->insert(array("users"=>$users));
var_dump($collection->findOne());
?>
The var_dump() call in the last line outputs:
array(2) { ["_id"]=> object(MongoId)#7 (0) { } ["users"]=> array(10)
{ [0]=> int(140071768428512) [1]=> int(140071768432108) [2]=> int
(140071768429558) [3]=> int(140071768429072) [4]=> int
(140071768434267) [5]=> int(140071768429153) [6]=> int
(140071768425764) [7]=> int(140071768430107) [8]=> int
(140071768429055) [9]=> int(140071768431405) } }
However, a "db.integers.find()" on shell returns: {"_id" :
"4a284b5e674c3b197d373a73" , "users" :
[4064,7660,5110,4624,9819,4705,1316,5659,4607,6957]} which is the
expected values.
Using php 5.2.9 and driver 0.9.1 installed from pecl.