Docs Menu
Docs Home
/ / /
PHP Library Manual
/ / /

MongoDB\Model\IndexInfo::getVersion()

On this page

  • Definition
  • Return Values
  • Examples
  • See Also
MongoDB\Model\IndexInfo::getVersion()

Return the index version.

function getVersion(): integer

The index version.

<?php
$info = new IndexInfo([
'v' => 1,
]);
var_dump($info->getVersion());

The output would then resemble:

int(1)
  • MongoDB\Collection::createIndex()

  • listIndexes command reference in the MongoDB manual

Back

getNamespace()