blob: e48d33fff123097deebc9e783ec2ed50ae5778db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
--TEST--
Test descriptor types for oci_new_descriptor()
--SKIPIF--
<?php
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
require(dirname(__FILE__).'/skipif.inc');
?>
--FILE--
<?php
require dirname(__FILE__).'/connect.inc';
// Successful statements
$d = oci_new_descriptor($c, OCI_D_FILE);
var_dump($d);
$d = oci_new_descriptor($c, OCI_DTYPE_FILE);
var_dump($d);
$d = oci_new_descriptor($c, OCI_D_LOB);
var_dump($d);
$d = oci_new_descriptor($c, OCI_DTYPE_LOB);
var_dump($d);
$d = oci_new_descriptor($c, OCI_D_ROWID);
var_dump($d);
$d = oci_new_descriptor($c, OCI_DTYPE_ROWID);
var_dump($d);
// Unsuccessful statements
$d = oci_new_descriptor($c, OCI_B_CLOB);
var_dump($d);
$d = oci_new_descriptor($c, OCI_B_CLOB);
var_dump($d);
$d = oci_new_descriptor($c, OCI_DEFAULT);
var_dump($d);
$d = oci_new_descriptor($c, 1);
var_dump($d);
echo "Done\n";
?>
--EXPECTF--
object(OCI-Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
object(OCI-Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
object(OCI-Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
object(OCI-Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
object(OCI-Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
object(OCI-Lob)#%d (1) {
["descriptor"]=>
resource(%d) of type (oci8 descriptor)
}
Warning: oci_new_descriptor(): Unknown descriptor type %d in %s on line %d
NULL
Warning: oci_new_descriptor(): Unknown descriptor type %d in %s on line %d
NULL
Warning: oci_new_descriptor(): Unknown descriptor type %d in %s on line %d
NULL
Warning: oci_new_descriptor(): Unknown descriptor type %d in %s on line %d
NULL
Done
|