Edit report at https://bugs.php.net/bug.php?id=64395&edit=1

 ID:                 64395
 Comment by:         pete at petermcdonald dot co dot uk
 Reported by:        abc905 at mail dot ru
 Summary:            Wrong result
 Status:             Open
 Type:               Bug
 Package:            Network related
 Operating System:   Windows 7 x64
 PHP Version:        5.4.12
 Block user comment: N
 Private report:     N

 New Comment:

I have tried to reproduce on php 5.4.11 (zend server install) using code 
specified 
but output is expected 1.1.11.11.


Previous Comments:
------------------------------------------------------------------------
[2013-03-08 19:54:51] abc905 at mail dot ru

Description:
------------
Hello,
It seems ip2long function returns wrong result   
1.1.9.9 instead of 1.1.11.11 when convert ip address like '1.1.011.011'

Thank you,
Alexander

---
>From manual page: http://www.php.net/function.long2ip
---


Test script:
---------------
$ip = '1.1.011.011';
$ip_long = sprintf("%u", ip2long($ip));
print long2ip($ip_long);




------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64395&edit=1

Reply via email to