Bug #13407 Updated: array index "2147483647" not equivalent to 2147483647

From: Date: Sun, 23 Sep 2001 18:59:11 +0000
Subject: Bug #13407 Updated: array index "2147483647" not equivalent to 2147483647
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-66411@lists.php.net to get a copy of this message
ID: 13407 Updated by: rasmus Reported By: trobinson@gksystems.com Old Status: Bogus Status: Open Bug Type: Unknown/Other Function Operating System: PHP Version: 4.0.4pl1 New Comment: Hrm.. Sure, that is the kneejerk response, but "too near"? 2147483647 is 2^31 - 1. I could understand if this happened at 2^31+1 and up, but not at 2^31 - 1. I'd like to see a better explanation of why this happens at instead of at 21474836478 Previous Comments: ------------------------------------------------------------------------ [2001-09-23 14:52:16] jeroen@php.net Integers are limited in capacity, you're too near the bounds of integer. If you need such high numbers, see GMP. Not a bug. (though technically it could be possible to let this single number work, the next one will fail.) Do a var_dump($ar) to see what happens. ------------------------------------------------------------------------ [2001-09-23 14:44:33] trobinson@gksystems.com $ar["2147483646"]="apples"; $ar["2147483647"]="oranges"; echo $ar[2147483646]; echo $ar[2147483647]; produces: apples ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=13407&edit=1

« previous php.dev (#66411) next »