xref: /PHP-8.3/ext/oci8/tests/error2.phpt (revision a53e5617)
1--TEST--
2Exercise error code for SUCCESS_WITH_INFO
3--EXTENSIONS--
4oci8
5--SKIPIF--
6<?php
7require_once 'skipifconnectfailure.inc';
8$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
9require __DIR__.'/skipif.inc';
10if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
11?>
12--FILE--
13<?php
14
15require __DIR__.'/connect.inc';
16
17ini_set('error_reporting', E_ALL);
18
19$s = oci_parse($c, "create or replace procedure myproc as begin bogus end;");
20$e = @oci_execute($s);
21if (!$e) {
22    $es = oci_error($s);
23    echo $es['message']."\n";
24}
25
26echo "Done\n";
27
28?>
29--EXPECTF--
30ORA-24344: %s
31Done
32