Location: PHPKode > projects > MongoDB PHP Driver > mongodb-mongo-php-driver-a593f23/tests/paired.php
<?php

$m = new Mongo("mongodb://localhost:27017,localhost:27018");

$c = $m->foo->bar;

while (true) {
  echo "finding... ";
  try {
    $c->findOne();
  }
  catch (Exception $e) {
    echo $e->getMessage();
  }
  echo "\n";

  sleep(1);
}

?>
Return current item: MongoDB PHP Driver