statement_cache.phpt 733 B

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