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