1--TEST--
2odbc_close_all(): Basic test
3--EXTENSIONS--
4odbc
5--SKIPIF--
6<?php include 'skipif.inc'; ?>
7--FILE--
8<?php
9
10include 'config.inc';
11
12$conn1 = odbc_connect($dsn, $user, $pass);
13$conn2 = odbc_pconnect($dsn, $user, $pass);
14$result1 = odbc_columns($conn1, '', '', '', '');
15$result2 = odbc_columns($conn2, '', '', '', '');
16
17var_dump($conn1);
18var_dump($conn2);
19var_dump($result1);
20var_dump($result2);
21
22odbc_close_all();
23
24try {
25    odbc_columns($conn1, '', '', '', '');
26} catch (Error $e) {
27    echo $e->getMessage() . "\n";
28}
29
30try {
31    odbc_columns($conn2, '', '', '', '');
32} catch (Error $e) {
33    echo $e->getMessage() . "\n";
34}
35
36try {
37    odbc_num_rows($result1);
38} catch (Error $e) {
39    echo $e->getMessage() . "\n";
40}
41
42try {
43    odbc_num_rows($result2);
44} catch (Error $e) {
45    echo $e->getMessage() . "\n";
46}
47
48?>
49--EXPECTF--
50object(Odbc\Connection)#%d (%d) {
51}
52object(Odbc\Connection)#%d (%d) {
53}
54object(Odbc\Result)#%d (%d) {
55}
56object(Odbc\Result)#%d (%d) {
57}
58ODBC connection has already been closed
59ODBC connection has already been closed
60ODBC result has already been closed
61ODBC result has already been closed
62