Bug #73396 [Asn->Csd]: bigint columns are returned as strings

From: Date: Thu, 27 Oct 2016 17:54:00 +0000
Subject: Bug #73396 [Asn->Csd]: bigint columns are returned as strings
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-205041@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73396&edit=1

 ID:                 73396
 Updated by:         adambaratz@php.net
 Reported by:        adambaratz@php.net
 Summary:            bigint columns are returned as strings
-Status:             Assigned
+Status:             Closed
 Type:               Bug
 Package:            PDO DBlib
 PHP Version:        7.0.12
 Assigned To:        adambaratz
 Block user comment: N
 Private report:     N

 New Comment:

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


Previous Comments:
------------------------------------------------------------------------
[2016-10-26 17:00:13] 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"



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



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


Thread (2 messages)

« previous php.bugs (#205041) next »