|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #72583 All data are fetched as strings
Submitted: 2016-07-12 09:05 UTC Modified: 2017-01-06 17:47 UTC
Avg. Score:4.3 ± 0.9
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: dorin dot marcoci at gmail dot com Assigned: ab (profile)
Status: Closed Package: PDO Firebird
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: dorin dot marcoci at gmail dot com
New email:
PHP Version: OS:


 [2016-07-12 09:05 UTC] dorin dot marcoci at gmail dot com
All columns are fetched as strings, even numeric, bools, etc...
Numeric columns (integers, floats) should be returned as native values.

In MySQL ND package this works as expected.
Please fix this for Firebird too.


Expected result:
Correct types

Actual result:
Incorrect types


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-07-13 01:28 UTC]
-Type: Bug +Type: Feature/Change Request
 [2016-07-13 01:28 UTC]
Changing this to be a FR;

Big side note here, every database driver seems to do this very differently and there is not much consistency across the board, even in PDO where I believe we had an option or similar to do so (or maybe it was just MySQL, I can't remember for certain).

But all in all, it would be nice to do this for all database drivers, or at least those that are in the core now with the increased typeness in PHP.
 [2016-07-13 01:28 UTC]
-Status: Open +Status: Verified
 [2017-01-06 02:04 UTC] spam2 at rhsoft dot net
oh yeah!

please the same for mysqli / pdo-mysql so that strict-typing becomes really useable because currently you need to to (int)$row['id'] when you pass the value to function(int $id)
 [2017-01-06 02:06 UTC] spam2 at rhsoft dot net
see also
 [2017-01-06 17:47 UTC]
-Status: Verified +Status: Closed -Assigned To: +Assigned To: ab
 [2017-01-06 17:47 UTC]
PR is merged.

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Aug 09 08:05:44 2022 UTC