xref: /PHP-8.2/ext/dba/tests/bug36436.phpt (revision eddab740)
1--TEST--
2Bug #36436 (DBA problem with Berkeley DB4)
3--EXTENSIONS--
4dba
5--SKIPIF--
6<?php
7require_once __DIR__ . '/setup/setup_dba_tests.inc';
8check_skip('db4');
9?>
10--FILE--
11<?php
12require_once __DIR__ . '/setup/setup_dba_tests.inc';
13$db_name = 'bug36436.db';
14
15$db = set_up_db_ex('db4', $db_name, LockFlag::DbLock, persistent: true);
16
17var_dump($db, dba_fetch('key1', $db));
18
19var_dump(dba_firstkey($db));
20var_dump(dba_nextkey($db));
21
22dba_close($db);
23
24?>
25--CLEAN--
26<?php
27require_once __DIR__ . '/setup/setup_dba_tests.inc';
28$db_name = 'bug36436.db';
29cleanup_standard_db($db_name);
30?>
31--EXPECTF--
32resource(%d) of type (dba persistent)
33string(16) "Content String 1"
34string(13) "[key10]name10"
35string(13) "[key30]name30"
36