1--TEST-- 2DRCP: oci_pconnect() and oci_connect() with different character sets 3--EXTENSIONS-- 4oci8 5--SKIPIF-- 6<?php 7require_once 'skipifconnectfailure.inc'; 8?> 9--FILE-- 10<?php 11 12require __DIR__."/details.inc"; 13 14// Create connections with oci_connect and oci_pconnect with UTF8 as Charset 15 16$c1 = oci_connect($user,$password,$dbase,"UTF8"); 17var_dump($c1); 18 19// Now with oci_pconnect() 20 21$p1 = oci_pconnect($user,$password,$dbase,"UTF8"); 22var_dump($p1); 23 24// Create two more connections with character set US7ASCII 25 26$c2 = oci_connect($user,$password,$dbase,"US7ASCII"); 27var_dump($c2); 28 29// Now with oci_pconnect() 30 31$p2 = oci_pconnect($user,$password,$dbase,"US7ASCII"); 32var_dump($p2); 33 34// The two connections c1 and c2 should not share resources as they use different 35//character sets 36 37if((int)$c1 === (int)$c2) 38 echo "First and third connections share a resource: NOT OK\n"; 39else 40 echo "First and third connections are different: OK\n"; 41 42// The two connections p1 and p2 should not share resources as they use different 43//character sets 44 45if((int)$p1 === (int)$p2) 46 echo "Second and fourth connections share a resource: NOT OK\n"; 47else 48 echo "Second and fourth connections are different: OK\n"; 49 50// Close all the connections 51oci_close($c1); 52oci_close($c2); 53oci_close($p1); 54oci_close($p2); 55 56echo "Done\n"; 57?> 58--EXPECTF-- 59resource(%d) of type (oci8 connection) 60resource(%d) of type (oci8 persistent connection) 61resource(%d) of type (oci8 connection) 62resource(%d) of type (oci8 persistent connection) 63First and third connections are different: OK 64Second and fourth connections are different: OK 65Done 66