<?php ip2long(string $ip): int|false
<?php $ip = gethostbyname('www.google.com'); if (ip2long($ip) === false) { echo 'Unable to resolve hostname' . PHP_EOL; exit(1); }