#32180 [Opn]: Operations with floating points bug
| From: | tony2001@php.net | Date: | Wed, 09 Mar 2005 11:57:05 +0000 |
| Subject: | #32180 [Opn]: Operations with floating points bug | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-75164@lists.php.net to get a copy of this message | ||
ID: 32180
Updated by: tony2001@php.net
Reported By: snirh at inag dot pt
Status: Open
-Bug Type: OCI8 related
+Bug Type: Scripting Engine problem
Operating System: WINDOWS SERVER 2003
PHP Version: 4.3.10
New Comment:
It has nothing to do with OCI8.
<?php
$a = "-,6";
var_dump((float)$a);
var_dump($a+2);
?>
Personally I think we should not support floats written in such a
braindead style.
Previous Comments:
------------------------------------------------------------------------
[2005-03-07 10:24:39] snirh at inag dot pt
Using last stable CVS (php4-win32-STABLE-200503070530.zip) the result
is the same.
------------------------------------------------------------------------
[2005-03-07 00:40:01] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2005-03-04 14:59:57] KRomas at goldentele dot com
My results is on the Linux/php 4.3.9
------------------------------------------------------------------------
[2005-03-04 14:52:06] snirh at inag dot pt
But this works fine on WINDOWS2000+PHP4.3.4+APACHE1.x. Why not on
WINDOWS SERVER 2003+PHP4.3.10+APACHE2.x?
------------------------------------------------------------------------
[2005-03-04 08:25:44] KRomas at goldentele dot com
echo '<PRE>';
$res = $obj_oracle->Get_rows('SELECT (-3/5) AS floatp FROM dual');
$res2 = $obj_oracle->Get_rows('SELECT to_char(-3/5, \'09999.9999\') AS
floatp FROM dual');
var_dump($res);
echo $res[0]['FLOATP'] + 2;
echo '<BR>';
echo $res2[0]['FLOATP'] + 2;
-------------------
array(1) {
[0]=>
array(1) {
["FLOATP"]=>
string(3) "-,6"
}
}
2
1.4
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/32180
--
Edit this bug report at http://bugs.php.net/?id=32180&edit=1