xref: /PHP-8.1/ext/oci8/tests/lob_temp.phpt (revision b5a14e6c)
1--TEST--
2temporary lobs
3--EXTENSIONS--
4oci8
5--SKIPIF--
6<?php
7$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
8require(__DIR__.'/skipif.inc');
9?>
10--FILE--
11<?php
12
13require __DIR__.'/connect.inc';
14
15$blob = oci_new_descriptor($c,OCI_D_LOB);
16var_dump($blob->writeTemporary("test"));
17var_dump($blob->load());
18var_dump($blob->seek(0, SEEK_SET));
19var_dump($blob->read(2));
20
21$c = oci_pconnect($user, $password, $dbase);
22
23$blob = oci_new_descriptor($c,OCI_D_LOB);
24var_dump($blob->writeTemporary("test"));
25var_dump($blob->load());
26var_dump($blob->seek(0, SEEK_SET));
27var_dump($blob->read(2));
28
29echo "Done\n";
30
31?>
32--EXPECT--
33bool(true)
34string(4) "test"
35bool(true)
36string(2) "te"
37bool(true)
38string(4) "test"
39bool(true)
40string(2) "te"
41Done
42