Consider this code:
<?
$mask_n = (pow(2,32) - (pow(2,32-24)-1));
printf("%x\n", $mask_n);
?>
On PHP 4.1.2 it prints:
ffffff00
On PHP 4.3.10 is prints:
ffffff01
Both versions of PHP are the standard Debian packaged versions (4.1.2
from Woody, 4.3.10 from Sarge)
tecra# php -v
PHP 4.3.10-9 (cli) (built: Mar 6 2005 17:45:14)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
admin# php -v
4.1.2
Results are (predictably) the same under both the CLI version and under
the Apache module.
Is this a bug in PHP, or is there something broken in my code?
<?
$mask_n = (pow(2,32) - (pow(2,32-24)-1));
printf("%x\n", $mask_n);
?>
On PHP 4.1.2 it prints:
ffffff00
On PHP 4.3.10 is prints:
ffffff01
Both versions of PHP are the standard Debian packaged versions (4.1.2
from Woody, 4.3.10 from Sarge)
tecra# php -v
PHP 4.3.10-9 (cli) (built: Mar 6 2005 17:45:14)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
admin# php -v
4.1.2
Results are (predictably) the same under both the CLI version and under
the Apache module.
Is this a bug in PHP, or is there something broken in my code?
Comment