1--TEST--
2Test some more oci_bind_by_name error conditions
3--EXTENSIONS--
4oci8
5--SKIPIF--
6<?php
7$target_dbs = array('oracledb' => true, 'timesten' => true);  // test runs on these DBs
8require(__DIR__.'/skipif.inc');
9preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
10if (!(isset($matches[0]) && $matches[1] >= 12)) {
11    die("skip expected output only valid when using Oracle Database 12c or greater");
12}
13preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
14if (!(isset($matches[0]) && $matches[0] >= 12)) {
15    die("skip works only with Oracle 12c or greater version of Oracle client libraries");
16}
17?>
18--FILE--
19<?php
20
21require(__DIR__.'/connect.inc');
22
23$sql = "begin
24        :output1 := 99;
25        :output2 := 'abc';
26       end;";
27
28$s = oci_parse($c, $sql);
29oci_bind_by_name($s, ':output1', $output1, -1, OCI_B_BOL);
30oci_bind_by_name($s, ':output2', $output2, -1, OCI_B_BOL);
31oci_execute($s);
32var_dump($output1);
33var_dump($output2);
34
35echo "Done\n";
36
37?>
38--EXPECTF--
39Warning: oci_execute(): ORA-06550: line %d, column %d:
40PLS-00382: %s
41ORA-06550: line %d, column %d:
42PL/SQL: %s
43ORA-06550: line %d, column %d:
44PLS-00382: %s
45ORA-06550: line %d, column %d:
46PL/SQL: %s in %s on line %d
47bool(false)
48bool(false)
49Done
50