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