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