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