<?php
$mc = new MongoClient('mongodb://localhost:27017', array('wTimeoutMS' => 500));
$coll = $mc->selectCollection('test', 'foo');
var_dump($coll->getWriteConcern());
$coll->setWriteConcern(1, 1000);
var_dump($coll->getWriteConcern());
?>
The above example will output:
array(2) {
["w"]=>
int(1)
["wtimeout"]=>
int(500)
}
array(2) {
["w"]=>
int(1)
["wtimeout"]=>
int(1000)
}