Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ PHP 8.7 UPGRADE NOTES
- MBString:
. Improved performance of mb_strlen for UTF-8 strings.

- PDO:
. Improved performance of fetching rows with PDO::FETCH_BOTH, the default
fetch mode, for results with more than 4 columns.

- PDO_PGSQL:
. Improved performance of the SQL parser that handles placeholders in
PDO::prepare() and, with emulated prepares, PDOStatement::execute().
Expand Down
3 changes: 2 additions & 1 deletion ext/pdo/pdo_stmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,8 @@ static bool do_fetch(pdo_stmt_t *stmt, zval *return_value, enum pdo_fetch_type h
case PDO_FETCH_NUM:
case PDO_FETCH_NAMED:
if (!group_key) {
array_init_size(return_value, stmt->column_count);
/* PDO::FETCH_BOTH stores every value under its name and its index */
array_init_size(return_value, how == PDO_FETCH_BOTH ? 2 * stmt->column_count : stmt->column_count);
} else {
array_init(return_value);
}
Expand Down
Loading