xref: /PHP-8.3/ext/oci8/tests/coll_003.phpt (revision a53e5617)
1--TEST--
2collection methods
3--EXTENSIONS--
4oci8
5--SKIPIF--
6<?php
7require_once 'skipifconnectfailure.inc';
8$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
9require __DIR__.'/skipif.inc';
10?>
11--FILE--
12<?php
13
14require __DIR__."/connect.inc";
15require __DIR__."/create_type.inc";
16
17$coll1 = oci_new_collection($c, $type_name);
18
19var_dump($coll1->size());
20var_dump($coll1->max());
21var_dump($coll1->trim(3));
22var_dump($coll1->append(1));
23var_dump($coll1->getElem(0));
24var_dump($coll1->assignElem(0,2));
25
26echo "Done\n";
27
28require __DIR__."/drop_type.inc";
29
30?>
31--EXPECTF--
32int(0)
33int(0)
34
35Warning: OCICollection::trim(): OCI-22167: given trim size [3] must be less than or equal to [0] in %s on line %d
36bool(false)
37bool(true)
38float(1)
39bool(true)
40Done
41