xref: /PHP-8.1/ext/dba/tests/dba011.phpt (revision b5a14e6c)
1--TEST--
2DBA argument tests
3--EXTENSIONS--
4dba
5--SKIPIF--
6<?php
7require_once(__DIR__ .'/skipif.inc');
8die("info $HND handler used");
9?>
10--FILE--
11<?php
12require_once(__DIR__ .'/test.inc');
13echo "database handler: $handler\n";
14var_dump(dba_open($db_file, 'n'));
15var_dump(dba_open($db_file, 'n', 'bogus'));
16var_dump(dba_open($db_file, 'q', $handler));
17var_dump(dba_open($db_file, 'nq', $handler));
18var_dump(dba_open($db_file, 'n', $handler, 2, 3, 4, 5, 6, 7, 8));
19?>
20--CLEAN--
21<?php
22require(__DIR__ .'/clean.inc');
23?>
24--EXPECTF--
25database handler: flatfile
26resource(%d) of type (dba)
27
28Warning: dba_open(%stest0.dbm,n): No such handler: bogus in %sdba011.php on line %d
29bool(false)
30
31Warning: dba_open(%stest0.dbm,q): Illegal DBA mode in %sdba011.php on line %d
32bool(false)
33
34Warning: dba_open(%stest0.dbm,nq): Illegal DBA mode in %sdba011.php on line %d
35bool(false)
36resource(%d) of type (dba)
37