Date: 11/14/00
- Next message: stas <email protected>: "[PHP-DEV] PHP 4.0 Bug #7039 Updated: ip2long() and long2ip() don't work"
- Previous message: Wico de Leeuw: "Re: [PHP-DEV] PHP 4.0 Bug #7808 Updated: variable value triggerd by function"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 7755
Updated by: stas
Reported By: roland <email protected>
Status: Feedback
Bug Type: Math related
Assigned To:
Comments:
Please try latest CVS version (also available from
snaps.php.net) and report if it works better.
Previous Comments:
---------------------------------------------------------------------------
[2000-11-10 22:29:04] roland <email protected>
I have the following snippet of code
$w = ip2long("192.168.2.35");
$x = $w & 0xffffff00;
$y = $w & (0xffffff << 8);
$z = ip2long("192.168.2.0");
printf ("w = %s<br>", dechex($w));
printf ("x = %s<br>", dechex($x));
printf ("y = %s<br>", dechex($y));
printf ("z = %s<br>", dechex($z));
which outputs this:
w = c0a80223
x = 80000000
y = c0a80200
z = c0a80200
I can't come up with any reason why $x should be set as it is....
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=7755
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: stas <email protected>: "[PHP-DEV] PHP 4.0 Bug #7039 Updated: ip2long() and long2ip() don't work"
- Previous message: Wico de Leeuw: "Re: [PHP-DEV] PHP 4.0 Bug #7808 Updated: variable value triggerd by function"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

