1--TEST-- 2oci_bind_array_by_name(), SQLT_CHR, default max_length and empty array 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 v$session'); 15 16$array = array(); 17 18try { 19 var_dump(oci_bind_array_by_name($statement, ":c1", $array, 5, -10, SQLT_CHR, -10)); 20} catch (ArgumentCountError $exception) { 21 echo $exception->getMessage() . "\n"; 22} 23 24var_dump(oci_bind_array_by_name($statement, ":c1", $array, 5, -10)); 25var_dump(oci_bind_array_by_name($statement, ":c1", $array, 5, -1)); 26var_dump(oci_bind_array_by_name($statement, ":c1", $array, 5, 0)); 27 28@oci_execute($statement); 29 30var_dump($array); 31 32echo "Done\n"; 33?> 34--EXPECTF-- 35oci_bind_array_by_name() expects at most 6 arguments, 7 given 36 37Warning: oci_bind_array_by_name(): You must provide max length value for empty arrays in %s on line %d 38bool(false) 39 40Warning: oci_bind_array_by_name(): You must provide max length value for empty arrays in %s on line %d 41bool(false) 42 43Warning: oci_bind_array_by_name(): You must provide max length value for empty arrays in %s on line %d 44bool(false) 45array(0) { 46} 47Done 48