xref: /PHP-8.1/ext/dba/tests/bug36436.phpt (revision b5a14e6c)
1--TEST--
2Bug #36436 (DBA problem with Berkeley DB4)
3--EXTENSIONS--
4dba
5--SKIPIF--
6<?php
7    $handler = 'db4';
8    require_once(__DIR__ .'/skipif.inc');
9?>
10--FILE--
11<?php
12
13$handler = 'db4';
14require_once(__DIR__ .'/test.inc');
15
16$db = dba_popen($db_filename, 'c', 'db4');
17
18dba_insert('X', 'XYZ', $db);
19dba_insert('Y', '123', $db);
20
21var_dump($db, dba_fetch('X', $db));
22
23var_dump(dba_firstkey($db));
24var_dump(dba_nextkey($db));
25
26dba_close($db);
27
28?>
29--CLEAN--
30<?php
31    require(__DIR__ .'/clean.inc');
32?>
33--EXPECTF--
34resource(%d) of type (dba persistent)
35string(3) "XYZ"
36string(1) "X"
37string(1) "Y"
38