mirror of
https://github.com/php/php-src.git
synced 2024-10-17 06:22:53 +00:00
d99f05f1a2
collections, statements and BLOBs seem to be working ok though there are still some things to be done in order to make oci_bind_array_by_name() work with U-strings Notes: - in Unicode mode OCI8 always speaks to Oracle server using UTF-16, so all the conversions are done by the client lib. This is why character set parameter of oci_connect() and NLS_LANG are ignored in U-mode. - BLOBs and CLOBs behave quite differently in U-mode. Reading data from a CLOB would result in Unicode string, while BLOBs would return binary string. Also, all LOB utilities work with _bytes_ when BLOB is used and _characters_ when it's CLOB. It's not that obvious, but it does make a lot of sense to me.
50 lines
739 B
PHP
50 lines
739 B
PHP
--TEST--
|
|
statement cache
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
require dirname(__FILE__)."/connect.inc";
|
|
|
|
$pc = oci_pconnect($user, $password, $dbase);
|
|
|
|
$stmt = oci_parse($pc, "select 1+3 from dual");
|
|
oci_execute($stmt);
|
|
var_dump(oci_fetch_array($stmt));
|
|
|
|
$stmt = oci_parse($pc, "select 1+3 from dual");
|
|
oci_execute($stmt);
|
|
var_dump(oci_fetch_array($stmt));
|
|
|
|
echo "Done\n";
|
|
?>
|
|
--EXPECTF--
|
|
array(2) {
|
|
[0]=>
|
|
string(1) "4"
|
|
["1+3"]=>
|
|
string(1) "4"
|
|
}
|
|
array(2) {
|
|
[0]=>
|
|
string(1) "4"
|
|
["1+3"]=>
|
|
string(1) "4"
|
|
}
|
|
Done
|
|
--UEXPECTF--
|
|
array(2) {
|
|
[0]=>
|
|
unicode(1) "4"
|
|
[u"1+3"]=>
|
|
unicode(1) "4"
|
|
}
|
|
array(2) {
|
|
[0]=>
|
|
unicode(1) "4"
|
|
[u"1+3"]=>
|
|
unicode(1) "4"
|
|
}
|
|
Done
|