Doc #79619 [ReO]: gethostname() should mention FQDN
| From: | lkmorlan at uwaterloo dot ca | Date: | Fri, 22 May 2020 14:01:08 +0000 |
| Subject: | Doc #79619 [ReO]: gethostname() should mention FQDN | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-17610@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79619&edit=1
ID: 79619
User updated by: lkmorlan at uwaterloo dot ca
Reported by: lkmorlan at uwaterloo dot ca
Summary: gethostname() should mention FQDN
Status: Re-Opened
Type: Documentation Problem
Package: *Network Functions
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
OK, how about:
The value is the output of the system hostname command, which will depend on system configuration.
Consult your system documentation.
Previous Comments:
------------------------------------------------------------------------
[2020-05-21 22:18:08] requinix@php.net
I wouldn't even mention fully-qualified - just say that it's from the system, consult your
system's documentation, the usual that we do for functions like this.
------------------------------------------------------------------------
[2020-05-21 20:51:49] lkmorlan at uwaterloo dot ca
I suggest adding:
The value is the output of the system hostname command. Depending on system configuration, this will
be either the fully-qualified domain name or just the local part of the name.
------------------------------------------------------------------------
[2020-05-21 19:57:51] requinix@php.net
PHP is merely reporting what your system says. There's no logic about making it fully-qualified
or not.
------------------------------------------------------------------------
[2020-05-21 19:33:03] lkmorlan at uwaterloo dot ca
Description:
------------
---
From manual page: https://php.net/function.gethostname
---
The documentation does not say anything about whether the return value is a fully-qualified domain
name or not; sometimes it is, sometimes it is not.
It should mention that it could return either and explain what causes it to do one or the other.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79619&edit=1