Bug #10715 Updated: -0 Returns true as an integer

From: Date: Sun, 22 Jul 2001 19:48:23 +0000
Subject: Bug #10715 Updated: -0 Returns true as an integer
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-60658@lists.php.net to get a copy of this message
ID: 10715 Updated by: andy Reported By: pillaged@hotmail.com Status: Open Bug Type: Math related Operating System: Debian GNU/Linux PHP Version: 4.0.5 New Comment: I believe this is probably because the negative sign is stripped from -0, so the variable just reads 0 (which is an integer.) Can anybody else verify this? Previous Comments: ------------------------------------------------------------------------ [2001-05-07 15:04:22] pillaged@hotmail.com $number = -0; if (is_integer($number) == true) { echo "number is an integer"; } else { echo "number is not an integer"; } /* -0 just generally works as a number it probably shouldn't */ ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=10715&edit=1

« previous php.dev (#60658) next »