For AI agents: a documentation index is available at https://www.mongodb.com/pt-br/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

MongoDB\Model\IndexInfo::getVersion()

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)