File size: 1,140 Bytes
1e94262
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
--TEST--
odbc_close(): Basic test
--EXTENSIONS--
odbc
--SKIPIF--
<?php include 'skipif.inc'; ?>
--FILE--
<?php

include 'config.inc';

$conn1 = odbc_connect($dsn, $user, $pass);
$conn2 = odbc_pconnect($dsn, $user, $pass);
$result1 = odbc_columns($conn1, '', '', '', '');
$result2 = odbc_columns($conn2, '', '', '', '');

var_dump($conn1);
var_dump($conn2);
var_dump($result1);
var_dump($result2);

odbc_close($conn1);
odbc_close($conn2);

try {
    odbc_columns($conn1, '', '', '', '');
} catch (Error $e) {
    echo $e->getMessage() . "\n";
}

try {
    odbc_columns($conn2, '', '', '', '');
} catch (Error $e) {
    echo $e->getMessage() . "\n";
}

try {
    odbc_num_rows($result1);
} catch (Error $e) {
    echo $e->getMessage() . "\n";
}

try {
    odbc_num_rows($result2);
} catch (Error $e) {
    echo $e->getMessage() . "\n";
}

?>
--EXPECTF--
object(Odbc\Connection)#%d (%d) {
}
object(Odbc\Connection)#%d (%d) {
}
object(Odbc\Result)#%d (%d) {
}
object(Odbc\Result)#%d (%d) {
}
ODBC connection has already been closed
ODBC connection has already been closed
ODBC result has already been closed
ODBC result has already been closed