php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #45764 gethostbyaddr does not return all hostnames
Submitted: 2008-08-08 14:00 UTC Modified: 2009-05-04 16:13 UTC
From: rgil at liquidnet dot com Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 5.2.6 OS: CentOS 5U2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rgil at liquidnet dot com
New email:
PHP Version: OS:

 

 [2008-08-08 14:00 UTC] rgil at liquidnet dot com
Description:
------------
gethostbyaddr does not return an array of hosts. Since 'host' on a linux/unix based system will return all of them for a specific IP, I think this should too. If it was intended to be this way, then this should be a feature request. If this function was intended to mimic the gnu host command, then this should be classified as a bug.

Reproduce code:
---------------
Only returns one entry. All versions.

Expected result:
----------------
Should return all host names associated with ip as gnu host does. Or an added feature to return all hosts as an array.

Actual result:
--------------
Single host returned.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-08 18:13 UTC] jani@php.net
Yes, it's supposed to only return one.
 [2009-05-04 15:26 UTC] pajoye@php.net
See previous comment.
 [2009-05-04 16:13 UTC] rgil at liquidnet dot com
Can you please update this to a feature request? Status should not be bogus.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 23 05:01:31 2024 UTC