Updates to Tomato RAF including NGINX && PHP
[tomato.git] / release / src / router / php / ext / oci8 / tests / coll_016.phpt
blob2e06e2959c10bb60bf171a03cd13cd5a6e6e16c1
1 --TEST--
2 collections and negative/too big element indexes
3 --SKIPIF--
4 <?php
5 $target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
6 require(dirname(__FILE__).'/skipif.inc');
7 ?> 
8 --FILE--
9 <?php
11 require dirname(__FILE__)."/connect.inc";
13 $ora_sql = "DROP TYPE
14                                                 ".$type_name."
15                    ";
17 $statement = OCIParse($c,$ora_sql);
18 @OCIExecute($statement);
20 $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF NUMBER";
21                           
22 $statement = OCIParse($c,$ora_sql);
23 OCIExecute($statement);
26 $coll1 = ocinewcollection($c, $type_name);
28 var_dump($coll1->append(1));
29 var_dump($coll1->assignElem(-1,2345));
30 var_dump($coll1->assignElem(5000,2345));
31 var_dump($coll1->getElem(-1));
32 var_dump($coll1->getElem(-100));
33 var_dump($coll1->getElem(500));
35 echo "Done\n";
37 require dirname(__FILE__)."/drop_type.inc";
40 --EXPECTF--
41 bool(true)
43 Warning: OCI-Collection::assignelem(): OCI-22165: given index [%d] must be in the range of %s to [0] in %s on line %d
44 bool(false)
46 Warning: OCI-Collection::assignelem(): OCI-22165: given index [5000] must be in the range of %s to [0] in %s on line %d
47 bool(false)
48 bool(false)
49 bool(false)
50 bool(false)
51 Done