1--TEST--
2DRCP: oci_connect() with oci_close() and oci8.old_oci_close_semantics ON
3--SKIPIF--
4<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
5--INI--
6oci8.old_oci_close_semantics=1
7oci8.connection_class=test
8--FILE--
9<?php
10
11require dirname(__FILE__)."/details.inc";
12
13// Test will open a connection
14// Close the connection
15// Open another connection
16// With oci_close() being a no-op, the same conneciton will be returned
17
18
19echo "This is with a OCI_CONNECT\n";
20var_dump($conn1 = oci_connect($user,$password,$dbase));
21$rn1 = (int)$conn1;
22oci_close($conn1);
23
24// Open another connection
25
26var_dump($conn2 = oci_connect($user,$password,$dbase));
27$rn2 = (int)$conn2;
28oci_close($conn2);
29
30// Compare the resource numbers
31
32if ($rn1 === $rn2)
33	echo "Both connections share a resource : OK\n";
34else
35	echo "Both connections are different : NOT OK\n";
36
37echo "Done\n";
38
39?>
40--EXPECTF--
41This is with a OCI_CONNECT
42resource(%d) of type (oci8 connection)
43resource(%d) of type (oci8 connection)
44Both connections share a resource : OK
45Done
46