xref: /PHP-7.3/ext/oci8/tests/coll_002.phpt (revision a2c0f872)
1--TEST--
2oci_new_collection() + 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 = oci_new_collection($c, $type_name));
15
16var_dump($coll1->free());
17var_dump($coll1->size());
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(): supplied resource is not a valid oci8 collection resource in %s on line %d
32bool(false)
33Done
34