Bad PHP error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I have tried the following script:

$val = 10000000000;
if (is_int($val)) {
echo $val;
}
else {
echo "$val is not an integer\n";
}

The answer is:

10000000000 is not an integer.

Why does this happen? I use PHP 5.

Isn't PHP able to work with values like 10 billion?

Do I need to use a certain special class for dealing with big numbers? How
can I use that class?

Thank you.

Teddy

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux