coll_010_func.phpt 831 B

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