Sunny
Sunny

Reputation: 119

difference between gethostbyname and gethostbynamel

What is difference between gethostbyname() and gethostbynamel() PHP function? As both returns A record for a domain name. Also which one perform better?

Upvotes: 1

Views: 1079

Answers (1)

DevZer0
DevZer0

Reputation: 13525

based on the documentation gethostbynamel returns the full list of resolved ip address of a specific hostname. where gethostbyname only returns one.

for an example try gethostbynamel('www.google.com'); so you will see a list returned.

Upvotes: 7

Related Questions