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