xref: /PHP-7.0/ext/oci8/tests/connect_1.phpt (revision 31c35e5c)
1--TEST--
2oci_pconnect() & oci_new_connect()
3--SKIPIF--
4<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
5--FILE--
6<?php
7
8require dirname(__FILE__)."/connect.inc";
9
10if (!empty($dbase)) {
11	var_dump($c1 = oci_pconnect($user, $password, $dbase));
12}
13else {
14	var_dump($c1 = oci_pconnect($user, $password));
15}
16
17if (!empty($dbase)) {
18	var_dump($c2 = oci_new_connect($user, $password, $dbase));
19}
20else {
21	var_dump($c2 = oci_new_connect($user, $password));
22}
23
24var_dump(oci_close($c1));
25var_dump(ocilogoff($c2));
26
27echo "Done\n";
28
29?>
30--EXPECTF--
31resource(%d) of type (oci8 persistent connection)
32resource(%d) of type (oci8 connection)
33bool(true)
34bool(true)
35Done
36