--TEST-- PHPC-667: BulkWrite::insert() does not generate ObjectId if another field has "_id" prefix --FILE-- insert(['_ids' => 1])); var_dump($bulk->insert((object) ['_ids' => 1])); ?> ===DONE=== --EXPECTF-- object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "%x" } object(MongoDB\BSON\ObjectId)#%d (%d) { ["oid"]=> string(24) "%x" } ===DONE===