gethostname
(PHP 5 >= 5.3.0, PHP 7, PHP 8)
gethostname — Gets the host name
Параметри
У цієї функції немає
параметрів.
Значення, що повертаються
Returns a string with the hostname on success, otherwise false is
returned.
Приклади
Приклад #1 A simple gethostname() example
<?php
echo gethostname(); // may output e.g,: sandie
?>
Прогляньте також
- gethostbyname() - Get the IPv4 address corresponding to a given Internet host name
- gethostbyaddr() - Отримує назву хоста в інтернеті, відповідну до заданої IP-адреси
- php_uname() - Returns information about the operating system PHP is running on