xref: /PHP-7.3/ext/oci8/tests/coll_004_func.phpt (revision a2c0f872)
1--TEST--
2oci_collection_assign()
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$coll2 = oci_new_collection($c, $type_name);
16
17var_dump(oci_collection_append($coll1, 1));
18
19var_dump(oci_collection_assign($coll2, $coll1));
20
21var_dump(oci_collection_element_get($coll2, 0));
22
23echo "Done\n";
24
25require dirname(__FILE__)."/drop_type.inc";
26
27?>
28--EXPECT--
29bool(true)
30bool(true)
31float(1)
32Done
33