← All docs

gethostbyname()

Gets the IPv4 address corresponding to the given Internet host name.

gethostbyname()

function gethostbyname(string $hostname): string

Gets the IPv4 address corresponding to the given Internet host name.

Parameters:

  • $hostname (string)

Returns: string

Availability

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how gethostbyname is implemented in the compiler, see the internals page.