Code snippet: ===================== $wConcern=array("0"=>"Fire and forget", "1"=>"Write acknowledged by the primary", "2"=>"Write confirmed in 2 secondaries", "3"=>"Write confirmed in 3 secondaries", "majority"=>"Write confirmed in the majority of secondaries"); # loop through write concern options foreach ($wConcern as $wc=>$desc){ print "Write concern: $wc : $desc \n"; $randomNumber=rand(10000000, 10000000000); $doc = array ( "className" => "nosql.test", "source" => $randomNumber . "_nosql.test", "domain" => $randomNumber . "_nosql.test", "username" => $randomNumber . "_nosql.test", "email" => "nosql.test@gmail.com", "externalId" => "9999999", "policySlug" => "NEW_POLICY", "passwordHash" => "xxxxxxxxxxxxxx", "active" => true, "identityId" => "888888888", ); $startTime = microtime(true); $thisColl->insert($doc, array("w" => $wc)); $endTime = microtime(true); $timeDiff = number_format($endTime - $startTime, 10); print "Cursor return: $timeDiff \n \n"; } =====================