MongoId
PHP Manual

MongoId::getHostname

(PECL mongo >= 1.0.8)

MongoId::getHostnameGets the hostname being used for this machine's ids

说明

publicstaticstring MongoId::getHostname ( void )

This returns the hostname MongoId is using to generate unique ids. This should be the same value gethostname() returns.

It is identical to the function:

<?php

public static function getHostname() {
    return 
gethostname();
}

?>

参数

此函数没有参数。

返回值

Returns the hostname.


MongoId
PHP Manual