Docs Menu

Docs HomePHP Library Manual


On this page

  • Definition
  • Errors/Exceptions
  • See Also

Advances the change stream and attempts to load the next event.

function next(): void


Advancing the change stream does not guarantee that there will be a current event to access. You should still call MongoDB\\ChangeStream::valid() to check for a current event at each step of iteration.

MongoDB\\Driver\\Exception\\RuntimeException for other errors at the driver level (e.g. connection errors).

←  MongoDB\ChangeStream::key()MongoDB\ChangeStream::rewind() →