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::getSizeOnDisk()

Definition

MongoDB\Model\DatabaseInfo::getSizeOnDisk

Return the total size of the database file on disk in bytes.

function getSizeOnDisk(): integer

Return Values

The total size of the database file on disk in bytes.

Examples

<?php

$info = new DatabaseInfo(['sizeOnDisk' => 1048576]);

var_dump($info->getSizeOnDisk());

The output would then resemble:

int(1048576)

See Also