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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 11:01:36 2025 UTC