xref: /PHP-5.4/ext/oci8/tests/coll_006_func.phpt (revision c7a8bd6a)
1--TEST--
2ocinewcollection() + free()
3--SKIPIF--
4<?php
5$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
6require(dirname(__FILE__).'/skipif.inc');
7?>
8--FILE--
9<?php
10
11require dirname(__FILE__)."/connect.inc";
12require dirname(__FILE__)."/create_type.inc";
13
14var_dump($coll1 = ocinewcollection($c, $type_name));
15
16var_dump(oci_free_collection($coll1));
17var_dump(oci_collection_size($coll1));
18
19echo "Done\n";
20
21require dirname(__FILE__)."/drop_type.inc";
22
23?>
24--EXPECTF--
25object(OCI-Collection)#%d (1) {
26  ["collection"]=>
27  resource(%d) of type (oci8 collection)
28}
29bool(true)
30
31Warning: oci_collection_size(): %d is not a valid oci8 collection resource in %s on line %d
32bool(false)
33Done
34