ID:               32180
 Updated by:       [EMAIL PROTECTED]
 Reported By:      snirh at inag dot pt
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: WINDOWS SERVER 2003
 PHP Version:      4.3.10
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

This is expected.


Previous Comments:
------------------------------------------------------------------------

[2005-03-09 12:57:03] [EMAIL PROTECTED]

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. 

------------------------------------------------------------------------

[2005-03-03 19:59:33] snirh at inag dot pt

Description:
------------
Using OCI libs to return values from a database, if this values is
negative floating point the result cannot be used as number!

Reproduce code:
---------------
$sql = "SELECT (-3/5) AS floatp FROM dual";
$conn2 = ocilogon("login", "pass", $srvc);
$stmt = ociparse($conn2, $sql);
ociexecute($stmt, OCI_DEFAULT);
while (ocifetch($stmt)) {
        echo $result = ociresult($stmt, "FLOATP")."\n\n";
 }
 echo $result + 2;

// This code return 2!!

Expected result:
----------------
1.4

Actual result:
--------------
2


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=32180&edit=1

Reply via email to