1--TEST--
2Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: no implicit results
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';
10preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
11if (!(isset($matches[0]) && $matches[1] >= 12)) {
12    die("skip expected output only valid when using Oracle Database 12c or greater");
13}
14preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
15if (!(isset($matches[0]) && $matches[0] >= 12)) {
16    die("skip works only with Oracle 12c or greater version of Oracle client libraries");
17}
18?>
19--FILE--
20<?php
21
22require __DIR__.'/connect.inc';
23
24// Run Test
25
26echo "Test 1\n";
27
28$s = oci_parse($c, "select * from dual");
29oci_execute($s);
30
31while (($s1 = oci_get_implicit_resultset($s))) {
32    while (($row = oci_fetch_array($s1, OCI_ASSOC+OCI_RETURN_NULLS)) != false) {
33        foreach ($row as $item) {
34            echo "  ".$item;
35        }
36        echo "\n";
37    }
38}
39
40var_dump($s1);
41
42?>
43--EXPECT--
44Test 1
45bool(false)
46