statement_cache.phpt 731 B

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