MongoId::getHostname

(PECL mongo >= 1.0.8)
Gets the hostname being used for this machine's ids
public static string 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:

Returns the hostname.

doc_php
2016-02-24 16:20:48
Comments
Leave a Comment

Please login to continue.