xref: /PHP-7.3/ext/oci8/tests/coll_003_func.phpt (revision a2c0f872)
1--TEST--
2collection methods
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
14$coll1 = oci_new_collection($c, $type_name);
15
16var_dump(oci_collection_size($coll1));
17var_dump(oci_collection_max($coll1));
18var_dump(oci_collection_trim($coll1, 3));
19var_dump(oci_collection_append($coll1, 1));
20var_dump(oci_collection_element_get($coll1, 0));
21var_dump(oci_collection_element_assign($coll1, 0, 2));
22
23echo "Done\n";
24
25require dirname(__FILE__)."/drop_type.inc";
26
27?>
28--EXPECTF--
29int(0)
30int(0)
31
32Warning: oci_collection_trim(): OCI-22167: given trim size [3] must be less than or equal to [0] in %s on line %d
33bool(false)
34bool(true)
35float(1)
36bool(true)
37Done
38