--TEST-- MongoDB\BSON\toPHP(): int64 values are returned as int scalars --FILE-- 123, // Using a 32-bit value to simplify testing 'int64' => new MongoDB\BSON\Int64(123), ]); var_dump(MongoDB\BSON\toPHP($bson)); ?> ===DONE=== --EXPECTF-- object(stdClass)#%d (%d) { ["int32"]=> int(123) ["int64"]=> int(123) } ===DONE===