Bug #71674 [Csd->Dup]: gethostbyname not return unmodified hostname

From: Date: Sat, 27 Feb 2016 01:05:03 +0000
Subject: Bug #71674 [Csd->Dup]: gethostbyname not return unmodified hostname
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-199496@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71674&edit=1 ID: 71674 Updated by: requinix@php.net Reported by: spacek at best-net dot cz Summary: gethostbyname not return unmodified hostname -Status: Closed +Status: Duplicate Type: Bug Package: Network related Operating System: Unix PHP Version: 7.0.3 Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2016-02-26 23:08:38] spacek at best-net dot cz bad comment ------------------------------------------------------------------------ [2016-02-26 23:03:53] spacek at best-net dot cz Description: ------------ Function gethostbyname() not return unmodified hostname in situation when the input string contains only numbers. Tested in: PHP 7.0.3 PHP 5.6.18 Test script: --------------- <?php echo gethostbyname('1111111').PHP_EOL; echo gethostbyname('111').PHP_EOL; echo gethostbyname('111.111').PHP_EOL; echo gethostbyname('111768768768768768.com').PHP_EOL; echo gethostbyname('a111').PHP_EOL; echo gethostbyname('foo').PHP_EOL; Expected result: ---------------- 0.16.244.71 0.0.0.111 111.0.0.111 111768768768768768.com a111 foo Actual result: -------------- 0.16.244.71 0.0.0.111 a111 foo ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=71674&edit=1

« previous php.bugs (#199496) next »