|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9698 ip2long and long2ip put back wrong answer
Submitted: 2001-03-12 05:45 UTC Modified: 2001-05-19 20:27 UTC
From: sajt at amon dot hu Assigned:
Status: Closed Package: Network related
PHP Version: 4.0.4pl1 OS: SuSe 6.4/7.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
43 - 34 = ?
Subscribe to this entry?

 [2001-03-12 05:45 UTC] sajt at amon dot hu
The script 
$ip = gethostbyname("");
$out = http://".ip2long($ip)."/<br>\n";
echo $out;

and the answer is:


what is wrong, because the correct answer is:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-19 20:27 UTC]
Fixed in CVS. This change will be available in PHP 4.0.6.

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Jan 21 21:03:37 2022 UTC