xref: /PHP-8.0/ext/oci8/tests/error1.phpt (revision c7a8bd6a)
1--TEST--
2oci_error() when oci_connect() fails
3--SKIPIF--
4<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
5--FILE--
6<?php
7
8var_dump(oci_connect("some", "some", "some"));
9var_dump(oci_error());
10
11echo "Done\n";
12
13?>
14--EXPECTF--
15Warning: oci_connect(): ORA-12154: %s in %s on line %d
16bool(false)
17array(4) {
18  ["code"]=>
19  int(12154)
20  ["message"]=>
21  string(%d) "ORA-12154: %s"
22  ["offset"]=>
23  int(0)
24  ["sqltext"]=>
25  string(0) ""
26}
27Done
28