PHP 4.0 Bug #9698: ip2long and long2ip put back wrong answer
| From: | sajt at amon dot hu | Date: | Mon, 12 Mar 2001 10:45:56 +0000 |
| Subject: | PHP 4.0 Bug #9698: ip2long and long2ip put back wrong answer | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-48723@lists.php.net to get a copy of this message | ||
From: sajt@amon.hu
Operating system: SuSe 6.4/7.1
PHP version: 4.0.4pl1
PHP Bug Type: Network related
Bug description: ip2long and long2ip put back wrong answer
The script
<?php
$ip = gethostbyname("www.php.net");
$out = http://".ip2long($ip)."/<br>\n";
echo $out;
?>
and the answer is:
http://-789091653/
what is wrong, because the correct answer is:
http://3505875643/
--
Edit Bug report at: http://bugs.php.net/?id=9698&edit=1