coll_002_func.phpt 722 B

123456789101112131415161718192021222324252627282930313233
  1. --TEST--
  2. oci_new_collection() + free()
  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. require dirname(__FILE__)."/create_type.inc";
  12. var_dump($coll1 = oci_new_collection($c, $type_name));
  13. var_dump(oci_free_collection($coll1));
  14. var_dump(oci_collection_size($coll1));
  15. echo "Done\n";
  16. require dirname(__FILE__)."/drop_type.inc";
  17. ?>
  18. --EXPECTF--
  19. object(OCI-Collection)#%d (1) {
  20. ["collection"]=>
  21. resource(%d) of type (oci8 collection)
  22. }
  23. bool(true)
  24. Warning: oci_collection_size(): %d is not a valid oci8 collection resource in %s on line %d
  25. bool(false)
  26. Done