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