xref: /PHP-8.3/ext/oci8/tests/lob_temp.phpt (revision a53e5617)
1--TEST--
2temporary lobs
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';
10?>
11--FILE--
12<?php
13
14require __DIR__.'/connect.inc';
15
16$blob = oci_new_descriptor($c,OCI_D_LOB);
17var_dump($blob->writeTemporary("test"));
18var_dump($blob->load());
19var_dump($blob->seek(0, SEEK_SET));
20var_dump($blob->read(2));
21
22$c = oci_pconnect($user, $password, $dbase);
23
24$blob = oci_new_descriptor($c,OCI_D_LOB);
25var_dump($blob->writeTemporary("test"));
26var_dump($blob->load());
27var_dump($blob->seek(0, SEEK_SET));
28var_dump($blob->read(2));
29
30echo "Done\n";
31
32?>
33--EXPECT--
34bool(true)
35string(4) "test"
36bool(true)
37string(2) "te"
38bool(true)
39string(4) "test"
40bool(true)
41string(2) "te"
42Done
43