#19012 [NEW]: is_integer doesn't return true
| From: | craesh at craesh dot net | Date: | Wed, 21 Aug 2002 07:45:22 +0000 |
| Subject: | #19012 [NEW]: is_integer doesn't return true | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-17416@lists.php.net to get a copy of this message | ||
From: craesh@craesh.net
Operating system: Linux
PHP version: 4.2.2
PHP Bug Type: Variables related
Bug description: is_integer doesn't return true
It's just that is_integer( $a_double_value ) doesn't seem to return true
nor anything else if the double matches a integer value. Just try this
script:
<?php
$a = 2.0;
$b = 1.0;
echo is_integer( $a/$b );
echo is_integer( 2.0 ); // Doesn't output anything
echo is_integer( 2 );
echo is_integer( 2/1 );
echo is_int( 2 ); // These 3 test do output "1"
?>
--
Edit bug report at http://bugs.php.net/?id=19012&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=19012&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=19012&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=19012&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=19012&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=19012&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=19012&r=support
Expected behavior: http://bugs.php.net/fix.php?id=19012&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=19012&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=19012&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=19012&r=globals