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

MongoDB\Model\DatabaseInfo::isEmpty()

MongoDB\Model\DatabaseInfo::isEmpty()

Return whether the database has any data.

function isEmpty(): boolean

A boolean indicating whether the database has any data.

<?php $info = new DatabaseInfo(['empty' => true]); var_dump($info->isEmpty());

The output would then resemble:

bool(true)