xref: /PHP-8.1/ext/oci8/tests/coll_009.phpt (revision b5a14e6c)
1--TEST--
2collections and wrong dates
3--EXTENSIONS--
4oci8
5--SKIPIF--
6<?php
7$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
8require(__DIR__.'/skipif.inc');
9?>
10--FILE--
11<?php
12
13require __DIR__."/connect.inc";
14
15$ora_sql = "DROP TYPE
16                        ".$type_name."
17           ";
18
19$statement = oci_parse($c,$ora_sql);
20@oci_execute($statement);
21
22$ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF DATE";
23
24$statement = oci_parse($c,$ora_sql);
25oci_execute($statement);
26
27
28$coll1 = oci_new_collection($c, $type_name);
29$coll2 = oci_new_collection($c, $type_name);
30
31var_dump($coll1->append("2005-07-28"));
32
33var_dump($coll2->assign($coll1));
34
35var_dump($coll2->getElem(0));
36
37echo "Done\n";
38
39require __DIR__."/drop_type.inc";
40
41?>
42--EXPECTF--
43Warning: OCICollection::append(): OCI-01861: literal does not match format string in %s on line %d
44bool(false)
45bool(true)
46bool(false)
47Done
48