#29737 [Opn->Csd]: ip2long() works not as documented
| From: | tony2001@php.net | Date: | Thu, 19 Aug 2004 05:57:27 +0000 |
| Subject: | #29737 [Opn->Csd]: ip2long() works not as documented | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969363323@lists.php.net to get a copy of this message | ||
ID: 29737
Updated by: tony2001@php.net
Reported By: belikoviv at is dot lg dot ua
-Status: Open
+Status: Closed
-Bug Type: *Network Functions
+Bug Type: Documentation problem
Operating System: Windows 2000 SP4; Fedora Core 2
PHP Version: 5.0.0
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2004-08-18 16:55:35] belikoviv at is dot lg dot ua
Description:
------------
Documentation (from 16-08-2004) says:
"Note: ip2long() will return -1 for the IP 255.255.255.255"
Instead it returns FALSE.
Reproduce code:
---------------
#!/usr/local/bin/php
<?php
$ip = "255.255.255.255";
$long = ip2long ( $ip );// if ( $long === FALSE ) $long = -1;
echo $ip, "\t", $long, "\t", long2ip ( $long ), "\n";
?>
Expected result:
----------------
255.255.255.255 -1 255.255.255.255
Actual result:
--------------
255.255.255.255 0.0.0.0
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29737&edit=1