Bug #77192 [NEW]: Rounding of double precision column

From: Date: Fri, 23 Nov 2018 13:54:05 +0000
Subject: Bug #77192 [NEW]: Rounding of double precision column
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-218104@lists.php.net to get a copy of this message
From: celiorod21 at gmail dot com Operating system: Irrelevant PHP version: 7.2.12 Package: PDO Firebird Bug Type: Bug Bug description:Rounding of double precision column Description: ------------ I'm working with geolocation and storing latitude and longitude data in a DOUBLE PRECISION field on firebird. When searching for these records, the PDO is rounding the values, as well as returning them as a string. The insertion of the data is not done from PDO but by an external system and is correct. Test script: --------------- <?php $conn = new PDO("firebird:dbname={$database}", "SYSDBA", "masterkey"); $query = $conn->query('SELECT CAST(25.3639309364232 AS DOUBLE PRECISION) FROM RDB$DATABASE'); echo $query->fetchColumn(); Expected result: ---------------- 25.3639309364232 Actual result: -------------- 25.363931 -- Edit bug report at https://bugs.php.net/bug.php?id=77192&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77192&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77192&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77192&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=77192&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=77192&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=77192&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=77192&r=needscript Try newer version: https://bugs.php.net/fix.php?id=77192&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=77192&r=support Expected behavior: https://bugs.php.net/fix.php?id=77192&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=77192&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=77192&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=77192&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77192&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=77192&r=dst IIS Stability: https://bugs.php.net/fix.php?id=77192&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=77192&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=77192&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=77192&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=77192&r=mysqlcfg

« previous php.bugs (#218104) next »