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