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