<?php gethostbyname(string $hostname): string
<?php if ($this->degradedMode && strpos($fileUrl, 'http://repo.packagist.org/') === 0) { $fileUrl = 'http://' . gethostbyname('repo.packagist.org') . substr($fileUrl, 20); $degradedPackagist = true; }
<?php $ip = gethostbyname('www.google.com'); if (ip2long($ip) === false) { echo 'Unable to resolve hostname' . PHP_EOL; exit(1);