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