xref: /PHP-5.6/ext/oci8/tests/array_bind_010.phpt (revision c7a8bd6a)
1--TEST--
2oci_bind_array_by_name() and invalid values 8
3--SKIPIF--
4<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
5--FILE--
6<?php
7
8require dirname(__FILE__).'/connect.inc';
9
10$statement = oci_parse($c, 'SELECT user FROM all_objects');
11
12$array = Array(1,2,3,4,5);
13
14oci_bind_array_by_name($statement, ":c1", $array, 5, 5, SQLT_CHR);
15
16oci_execute($statement);
17
18var_dump($array);
19
20echo "Done\n";
21?>
22--EXPECTF--
23Warning: oci_bind_array_by_name(): ORA-01036: illegal variable name/number in %s on line %d
24array(5) {
25  [0]=>
26  string(1) "1"
27  [1]=>
28  string(1) "2"
29  [2]=>
30  string(1) "3"
31  [3]=>
32  string(1) "4"
33  [4]=>
34  string(1) "5"
35}
36Done
37