Navigation
This version of the documentation is archived and no longer supported. To learn how to upgrade your version of PHP Library Manual, refer to the upgrade documentation.

MongoDB\Model\DatabaseInfo::isEmpty()

Definition

MongoDB\Model\DatabaseInfo::isEmpty

Return whether the database has any data.

function isEmpty(): boolean

Return Values

A boolean indicating whether the database has any data.

Examples

<?php

$info = new DatabaseInfo(['empty' => true]);

var_dump($info->isEmpty());

The output would then resemble:

bool(true)

See Also