[php-src] Issue #11587: After php8.1, when PDO::ATTR_EMULATE_PREPARES is true and PDO::ATTR_STRINGIFY_FETCHES is true, decimal zeros are no longer
filled.

From: Date: Tue, 04 Jul 2023 06:19:01 +0000
Subject: [php-src] Issue #11587: After php8.1, when PDO::ATTR_EMULATE_PREPARES is true and PDO::ATTR_STRINGIFY_FETCHES is true, decimal zeros are no longer
filled.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-244873@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/11587 Author: SakiTakamachi ### Description ``` PDO::ATTR_EMULATE_PREPARES = ture PDO::ATTR_STRINGIFY_FETCHES = true // DB value is 3.60, type is float // php8.0 "3.60" // php8.1 "3.6" ``` document MySQL Driver[ ¶](https://www.php.net/manual/en/migration81.incompatible.php#migration81.incompatible.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. The previous behaviour can be restored by enabling the PDO::ATTR_STRINGIFY_FETCHES option. ``` I do not know if this is the intended change, but I believe that either the implementation or the documentation must be corrected, since at least the documentation is different from the actual situation. What do you think? I posted the same information in the document issue. https://github.com/php/doc-en/issues/2557 ### PHP Version PHP 8.2.7 ### Operating System _No response_

« previous php.bugs (#244873) next »