1--TEST--
2Bug #79106 (PDO may fetch wrong column indexes with PDO::FETCH_BOTH) - collision
3--EXTENSIONS--
4pdo
5--SKIPIF--
6<?php
7$dir = getenv('REDIR_TEST_DIR');
8if (!$dir) die('skip no driver');
9require_once $dir . 'pdo_test.inc';
10try {
11    $db = PDOTest::factory();
12} catch (PDOException $e) {
13    die('skip ' . $e->getMessage());
14}
15if (@$db->query('SELECT 1 as "1"') === false) {
16    die('skip driver does not support quoted numeric identifiers');
17}
18?>
19--FILE--
20<?php
21if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR=' . dirname(__FILE__) . '/../../pdo/tests/');
22require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc';
23$db = PDOTest::factory();
24
25$stmt = $db->query('SELECT 11111 as "1", 22222 as "2"');
26var_dump($stmt->fetchAll());
27?>
28--EXPECT--
29array(1) {
30  [0]=>
31  array(3) {
32    [1]=>
33    string(5) "11111"
34    [0]=>
35    string(5) "11111"
36    [2]=>
37    string(5) "22222"
38  }
39}
40