1--TEST--
2PDO_OCI: Attribute: Client version
3--EXTENSIONS--
4pdo
5pdo_oci
6--SKIPIF--
7<?php
8require(__DIR__.'/../../pdo/tests/pdo_test.inc');
9PDOTest::skip();
10?>
11--FILE--
12<?php
13
14require(__DIR__ . '/../../pdo/tests/pdo_test.inc');
15
16$dbh = PDOTest::factory();
17
18echo "ATTR_CLIENT_VERSION: ";
19$cv = $dbh->getAttribute(PDO::ATTR_CLIENT_VERSION);
20var_dump($cv);
21
22$s = explode(".", $cv);
23if (count($s) > 1 && (($s[0] == 10 && $s[1] >= 2) || $s[0] >= 11)) {
24    if (count($s) != 5) {
25        echo "Wrong number of values in array\nVersion was: ";
26        var_dump($cv);
27    } else {
28        echo "Version OK, so far as can be portably checked\n";
29    }
30} else {
31    if (count($s) != 2) {
32        echo "Wrong number of values in array\nVersion was: ";
33        var_dump($cv);
34    } else {
35        echo "Version OK, so far as can be portably checked\n";
36    }
37}
38
39echo "Done\n";
40
41?>
42--EXPECTF--
43ATTR_CLIENT_VERSION: string(%d) "%d.%s"
44Version OK, so far as can be portably checked
45Done
46