php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73396 bigint columns are returned as strings
Submitted: 2016-10-26 17:00 UTC Modified: 2016-10-26 17:01 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: adambaratz@php.net Assigned: adambaratz (profile)
Status: Closed Package: PDO DBlib
PHP Version: 7.0.12 OS:
Private report: No CVE-ID: None
 [2016-10-26 17:00 UTC] adambaratz@php.net
Description:
------------
See test script. Should ideally return an int, but ensure that the SQL type won't overflow the PHP type.

Test script:
---------------
$pdo = new \PDO(...);
$statement = $pdo->query('select cast(1 as bigint)');
var_dump($statement->fetchColumn()); // string(1) "1"


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-10-26 17:01 UTC] adambaratz@php.net
-Assigned To: +Assigned To: adambaratz
 [2016-10-27 17:53 UTC] adambaratz@php.net
Automatic comment on behalf of adambaratz
Revision: http://git.php.net/?p=php-src.git;a=commit;h=0a2c02cb57d2d2f3cb0bd762b686a45b83d129ca
Log: Fix #73396: bigint columns are returned as strings
 [2016-10-27 17:53 UTC] adambaratz@php.net
-Status: Assigned +Status: Closed
 [2017-01-12 09:12 UTC] krakjoe@php.net
Automatic comment on behalf of adambaratz
Revision: http://git.php.net/?p=php-src.git;a=commit;h=0a2c02cb57d2d2f3cb0bd762b686a45b83d129ca
Log: Fix #73396: bigint columns are returned as strings
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 07:01:29 2024 UTC