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