php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7039 ip2long() and long2ip() don't work
Submitted: 2000-10-05 08:04 UTC Modified: 2009-04-01 11:05 UTC
From: jpm at kefta dot com Assigned:
Status: Closed Package: Network related
PHP Version: 4.0.1pl2 OS: Solaris 2.8
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: jpm at kefta dot com
New email:
PHP Version: OS:

 

 [2000-10-05 08:04 UTC] jpm at kefta dot com
This is the simple script I'm trying to use:

<?php
$ip = "255.255.255.255";
echo ip2long($ip);
?>

That will echo "-1708283823", or some weird number like that, when it should be echoing "4294967295". It also does not work when I try to get the standard IP Address from "4294967295" using long2ip(), it gives some weird number.

Joao Prado Maia

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-14 12:05 UTC] stas@php.net
Fixed in CVS.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 18:01:29 2024 UTC