Updates to Tomato RAF including NGINX && PHP
[tomato.git] / release / src / router / php / ext / oci8 / tests / drcp_pconn_close2.phpt
blob5fd2c2355f6eafe78798e0ed52d002caec3fe825
1 --TEST--
2 DRCP: 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--
6 oci8.old_oci_close_semantics=0
7 oci8.connection_class=test
8 --FILE--
9 <?php
11 require dirname(__FILE__)."/details.inc";
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
20 echo "This is with a OCI_PCONNECT\n";
21 var_dump($conn1 = oci_pconnect($user,$password,$dbase));
22 $rn1 = (int)$conn1;
23 oci_close($conn1);
25 // Query for the row updated. The new value should be returned
27 var_dump($conn2 = oci_pconnect($user,$password,$dbase));
28 $rn2 = (int)$conn2;
29 oci_close($conn2);
31 // Compare the resource numbers
33 if ($rn1 === $rn2)
34         echo "Both connections share a resource : NOT OK \n";
35 else
36         echo "Both connections are different : OK \n";
38 echo "Done\n";
41 --EXPECTF--
42 This is with a OCI_PCONNECT
43 resource(%d) of type (oci8 persistent connection)
44 resource(%d) of type (oci8 persistent connection)
45 Both connections are different : OK 
46 Done