Currently PHP integer is limited to 2147483647 or 9223372036854775807 (PHP_INT_MAX), depending of system bits. We can works with long integers by using bcmath, for instance. But why not to support it natively?
I mean, PHP can parse infinity integers, but it's converted to cientific notation or to INF. My suggestion is that, instead of convert it, stores the value in another format, an int[] or string, expanding depending of parsed length. Then accept things like: 10000000000000000000000000000000 + 10000000000000000000000000000000 = 20000000000000000000000000000000 Yeah, I know that it should be slower than normal ints, but is an exceptional case. It should avoid problems caused by untested code with very large numbers, for instance. Same for float values, but in this case I think that should have a best implementation to defines length of mantissa, for instance (new Float($float, $bits), for instance). But it can be part of another discussion. -- David Rodrigues -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php