From:             abc905 at mail dot ru
Operating system: Windows 7 x64
PHP version:      5.4.12
Package:          Network related
Bug Type:         Bug
Bug description:Wrong result 

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 bug report at https://bugs.php.net/bug.php?id=64395&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=64395&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=64395&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=64395&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=64395&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=64395&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=64395&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=64395&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=64395&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=64395&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=64395&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=64395&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=64395&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=64395&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64395&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=64395&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=64395&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=64395&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64395&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=64395&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=64395&r=mysqlcfg

Reply via email to