> When assigning the value -2147483648 to a variable, the variable becomes a double, 
>even though the value is within the range of integers. In fact, assigning -2147483647 
>- 1 works, as does using intval("-2147483648").
> 
> The following script demonstrates, and can be accessed at 
><http://www.randomsample.org/tests/test-int-min.php>.
> 
> <?php
> $int_max = 2147483647;
> $int_min = -2147483648;
> $int_min_alt = -2147483647 - 1;
2^31 = 2147483647
If I m not wrong, php code integer on 32bits, 1 bit for the sign, interval will be 
-2147483647 (2^31).
As the docs say, double will be used for larger integer values.

pa

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to