xref: /PHP-8.3/ext/oci8/tests/coll_013_func.phpt (revision a53e5617)
1--TEST--
2collections and correct dates (2)
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 DATE";
24
25$statement = oci_parse($c,$ora_sql);
26oci_execute($statement);
27
28
29$coll1 = oci_new_collection($c, $type_name);
30
31var_dump(oci_collection_append($coll1, "28-JUL-05"));
32var_dump(oci_collection_element_assign($coll1, 0, "01-JAN-05"));
33var_dump(oci_collection_element_get($coll1, 0));
34
35echo "Done\n";
36
37require __DIR__."/drop_type.inc";
38
39?>
40--EXPECT--
41bool(true)
42bool(true)
43string(9) "01-JAN-05"
44Done
45