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