|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-02-27 01:11 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
[2016-02-27 01:11 UTC] requinix@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 16:00:02 2025 UTC |
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: ---------------- 1111111 111 111.111 111768768768768768.com a111 foo Actual result: -------------- 0.16.244.71 0.0.0.111 111.0.0.111 111768768768768768.com a111 foo