xref: /PHP-7.2/ext/oci8/tests/statement_cache.phpt (revision 37652336)
1--TEST--
2statement cache
3--SKIPIF--
4<?php
5$target_dbs = array('oracledb' => true, 'timesten' => true);  // test runs on these DBs
6require(dirname(__FILE__).'/skipif.inc');
7?>
8--FILE--
9<?php
10
11// Note: with TimesTen, the column will be called "EXP"
12
13require dirname(__FILE__)."/connect.inc";
14
15$pc = oci_pconnect($user, $password, $dbase);
16
17$stmt = oci_parse($pc, "select 1+3 from dual");
18oci_execute($stmt);
19var_dump(oci_fetch_array($stmt));
20
21$stmt = oci_parse($pc, "select 1+3 from dual");
22oci_execute($stmt);
23var_dump(oci_fetch_array($stmt));
24
25echo "Done\n";
26?>
27--EXPECTF--
28array(2) {
29  [0]=>
30  string(1) "4"
31  ["%r(1\+3|EXP)%r"]=>
32  string(1) "4"
33}
34array(2) {
35  [0]=>
36  string(1) "4"
37  ["%r(1\+3|EXP)%r"]=>
38  string(1) "4"
39}
40Done
41