1--TEST-- 2DRCP: oci_connect() 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 dirname(__FILE__)."/details.inc"; 12 13// Test will open a 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 conneciton will be different 18 19 20// OCI_CONNECT 21echo "This is with a OCI_CONNECT\n"; 22var_dump($conn1 = oci_connect($user,$password,$dbase)); 23$rn1 = (int)$conn1; 24oci_close($conn1); 25 26// Open another connection 27var_dump($conn2 = oci_connect($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_CONNECT 43resource(%d) of type (oci8 connection) 44resource(%d) of type (oci8 connection) 45Both connections are different : OK 46Done 47