xref: /php-src/ext/pdo_dblib/tests/bug_71667.phpt (revision d6a0b3af)
1--TEST--
2PDO_DBLIB: Emulate how mssql extension names "computed" columns
3--EXTENSIONS--
4pdo_dblib
5--SKIPIF--
6<?php
7require __DIR__ . '/config.inc';
8getDbConnection();
9?>
10--FILE--
11<?php
12require __DIR__ . '/config.inc';
13
14$db = getDbConnection();
15
16$stmt = $db->prepare("SELECT 1, 2 AS named, 3");
17$stmt->execute();
18var_dump($stmt->fetchAll());
19
20?>
21--EXPECT--
22array(1) {
23  [0]=>
24  array(6) {
25    ["computed"]=>
26    int(1)
27    [0]=>
28    int(1)
29    ["named"]=>
30    int(2)
31    [1]=>
32    int(2)
33    ["computed1"]=>
34    int(3)
35    [2]=>
36    int(3)
37  }
38}
39