php.net |  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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sajt at amon dot hu
New email:
PHP Version: OS:

 

 [2001-03-12 05:45 UTC] sajt at amon dot hu
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/




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

Derick
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Nov 29 00:03:13 2021 UTC