Home > PHP > Function > Network > gethostname()

gethostname()

gethostname - Gets the host name

Syntax

string gethostname ()

Arguments

-

Description

gethostname() gets the standard host name for the local machine.

Version

PHP >= 5.3.0

Return value

Returns a string with the hostname on success, otherwise FALSE is returned.