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