Function __global->gethostbyname

Definitions

sources_custom/phpstub.php

  • Get the IP address corresponding to a given Internet host name.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$hostname string No No required parameter N/A N/A Host name

Returns

  • IP address OR host name if failed to look up
  • Type: string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get the IP address corresponding to a given Internet host name.
 *
 * @param  string $hostname Host name
 * @return string IP address OR host name if failed to look up
 */

function gethostbyname(string $hostname) : string