xref: /PHP-8.3/ext/oci8/tests/coll_011.phpt (revision a53e5617)
1--TEST--
2collections and strings
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";
15
16$ora_sql = "DROP TYPE
17                        ".$type_name."
18           ";
19
20$statement = oci_parse($c,$ora_sql);
21@oci_execute($statement);
22
23$ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)";
24
25$statement = oci_parse($c,$ora_sql);
26oci_execute($statement);
27
28
29$coll1 = oci_new_collection($c, $type_name);
30$coll2 = oci_new_collection($c, $type_name);
31
32var_dump($coll1->append("string"));
33var_dump($coll1->append("string"));
34
35var_dump($coll2->assign($coll1));
36
37var_dump($coll2->getElem(0));
38
39echo "Done\n";
40
41require __DIR__."/drop_type.inc";
42
43?>
44--EXPECT--
45bool(true)
46bool(true)
47bool(true)
48string(6) "string"
49Done
50