note 75695 deleted from language.types.integer by googleguy

From: Date: Fri, 11 Jan 2013 09:29:25 +0000
Subject: note 75695 deleted from language.types.integer by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-192912@lists.php.net to get a copy of this message
Note Submitter: me at troyswanson dot net ---- This note applies to machines that are using a 32 bit integer size. I imagine the same results occur in 64 bit machines as well (with the number 2^63-1). -2147483648 falls into the range of 32 bit signed integers (0b10000000000000000000000000000000), yet php treats it as a float. However, -2147483647-1 is treated as an integer. The following code demonstrates: <?php var_dump(-2147483648); //float(-2147483648) var_dump(-2147483647 - 1); //int(-2147483648) ?> Regards

« previous php.notes (#192912) next »