xref: /PHP-8.0/ext/oci8/tests/coll_003.phpt (revision ff66e494)
1--TEST--
2collection methods
3--SKIPIF--
4<?php
5$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
6require(__DIR__.'/skipif.inc');
7?>
8--FILE--
9<?php
10
11require __DIR__."/connect.inc";
12require __DIR__."/create_type.inc";
13
14$coll1 = oci_new_collection($c, $type_name);
15
16var_dump($coll1->size());
17var_dump($coll1->max());
18var_dump($coll1->trim(3));
19var_dump($coll1->append(1));
20var_dump($coll1->getElem(0));
21var_dump($coll1->assignElem(0,2));
22
23echo "Done\n";
24
25require __DIR__."/drop_type.inc";
26
27?>
28--EXPECTF--
29int(0)
30int(0)
31
32Warning: OCICollection::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