summaryrefslogtreecommitdiff
path: root/UPGRADING
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-12-15 17:07:27 +0100
committerNikita Popov <nikita.ppv@gmail.com>2020-12-17 10:54:34 +0100
commitc18b1aea289e8ed6edb3f6e6a135018976a034c6 (patch)
treeb0e1811aa85920dfd09ce2921a104dcacb7e8305 /UPGRADING
parent33e904915ec9f19b697589d7b73c908953671020 (diff)
downloadphp-git-c18b1aea289e8ed6edb3f6e6a135018976a034c6.tar.gz
PDO MySQL: Use native types for results
Previously, PDO MySQL only fetched data as native int/float if native prepared statements were used. This patch updates PDO to have the same behavior for emulated prepared statements, and thus removes the largest remaining discrepancy between these two modes. Note that PDO already has a ATTR_STRINGIFY_FETCHES option to control whether native types are desired or not. The previous output can be restored by enabling this option. Most of the tests make use of that option, because this allows the tests to work under libmysqlclient as well, which currently always returns string results (independently of whether native or emulated PS are used).
Diffstat (limited to 'UPGRADING')
-rw-r--r--UPGRADING6
1 files changed, 6 insertions, 0 deletions
diff --git a/UPGRADING b/UPGRADING
index 7f530497e7..d2aaa08ac5 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -31,6 +31,12 @@ PHP 8.1 UPGRADE NOTES
. The mysqlnd.fetch_copy_data ini setting has been removed. However, this
should not result in user-visible behavior changes.
+- PDO MySQL:
+ . Integers and floats in result sets will now be returned using native PHP
+ types instead of strings when using emulated prepared statements. This
+ matches the behavior of native prepared statements. You can restore the
+ previous behavior by enabling the PDO::ATTR_STRINGIFY_FETCHES option.
+
- Standard:
. version_compare() no longer accepts undocumented operator abbreviations.