xref: /PHP-5.6/ext/oci8/tests/array_bind_013.phpt (revision a5f3e151)
1--TEST--
2oci_bind_array_by_name(), SQLT_CHR, default max_length and empty array
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 v$session');
11
12$array = array();
13
14var_dump(oci_bind_array_by_name($statement, ":c1", $array, 5, -10, SQLT_CHR, -10));
15var_dump(oci_bind_array_by_name($statement, ":c1", $array, 5, -10));
16var_dump(oci_bind_array_by_name($statement, ":c1", $array, 5, -1));
17var_dump(oci_bind_array_by_name($statement, ":c1", $array, 5, 0));
18
19@oci_execute($statement);
20
21var_dump($array);
22
23echo "Done\n";
24?>
25--EXPECTF--
26Warning: oci_bind_array_by_name() expects at most 6 parameters, 7 given in %s on line %d
27NULL
28
29Warning: oci_bind_array_by_name(): You must provide max length value for empty arrays in %s on line %d
30bool(false)
31
32Warning: oci_bind_array_by_name(): You must provide max length value for empty arrays in %s on line %d
33bool(false)
34
35Warning: oci_bind_array_by_name(): You must provide max length value for empty arrays in %s on line %d
36bool(false)
37array(0) {
38}
39Done
40