string gethostname (void)Parameters:This function takes no parameters.Return Value:This function returns the hostname or domain name on success and FALSE on failure.Note.This function is available for PHP 5.3.0 and later.The following program illustrates the gethostname() functionin PHP: Program :
// Use gethostname() function for
// get hostname
echo
gethostname();
?>
Output:pppContainer
Link: https://www.php.net/manual/en/function.gethostname.php