1--TEST--
2DRCP: oci_pconnect() with oci_close() and oci8.old_oci_close_semantics ON
3--EXTENSIONS--
4oci8
5--INI--
6oci8.old_oci_close_semantics=1
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() being a no-op, the same connection will be returned
17
18echo "This is with a OCI_PCONNECT\n";
19var_dump($conn1 = oci_pconnect($user,$password,$dbase));
20$rn1 = (int)$conn1;
21oci_close($conn1);
22
23//  Open another connection
24
25var_dump($conn2 = oci_pconnect($user,$password,$dbase));
26$rn2 = (int)$conn2;
27oci_close($conn2);
28
29// Compare the resource numbers
30
31if ($rn1 === $rn2)
32    echo "Both connections share a resource : OK\n";
33else
34    echo "Both connections are different : NOT OK\n";
35
36echo "Done\n";
37
38?>
39--EXPECTF--
40Deprecated: Directive oci8.old_oci_close_semantics is deprecated%s
41This is with a OCI_PCONNECT
42resource(%d) of type (oci8 persistent connection)
43resource(%d) of type (oci8 persistent connection)
44Both connections share a resource : OK
45Done
46