Closed
Description
Description
The following code:
<?php
var_dump((new SQLite3(':memory:'))
->query('SELECT 1 AS key,2 AS key')
->fetchArray(SQLITE3_ASSOC));
Resulted in this output, for PHP 8.2.*:
array(2) {
["key"]=>
int(1)
["key"]=>
int(2)
}
But I expected this output instead, like PHP 8.1.20 and earlier:
array(1) {
["key"]=>
int(2)
}
These duplicate keys are propagated by json_encode()
, serialize()
, ... resulting in invalid JSON, for example.
PHP Version
PHP 8.2.7
Operating System
FreeBSD 13.1-RELEASE-p6