coll_017_func.phpt 818 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. --TEST--
  2. collections and nulls (2)
  3. --EXTENSIONS--
  4. oci8
  5. --SKIPIF--
  6. <?php
  7. $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
  8. require(__DIR__.'/skipif.inc');
  9. ?>
  10. --FILE--
  11. <?php
  12. require __DIR__."/connect.inc";
  13. error_reporting(E_ALL ^ E_DEPRECATED);
  14. $ora_sql = "DROP TYPE ".$type_name;
  15. $statement = oci_parse($c,$ora_sql);
  16. @oci_execute($statement);
  17. $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)";
  18. $statement = oci_parse($c,$ora_sql);
  19. oci_execute($statement);
  20. $coll1 = oci_new_collection($c, $type_name);
  21. var_dump(oci_collection_append($coll1, "string"));
  22. var_dump(oci_collection_element_assign($coll1, 0, null));
  23. var_dump(oci_collection_element_get($coll1, 0));
  24. echo "Done\n";
  25. require __DIR__."/drop_type.inc";
  26. ?>
  27. --EXPECT--
  28. bool(true)
  29. bool(true)
  30. NULL
  31. Done