summaryrefslogtreecommitdiff
path: root/ext/db/tests/003.phpt
blob: 6d3f7d3611fb3472953d55354f78f4bbb6242157 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--TEST--
DBM Insert/Replace/Fetch Test
--SKIPIF--
<?php if (!extension_loaded("db")) print "skip"; ?>
--FILE--
<?php
	require_once('test.inc');
	if (dbmopen($db_file, "n")) {
		dbminsert($db_file, "key1", "This is a test insert");
		dbmreplace($db_file, "key1", "This is the replacement text");
		@dbminsert($db_file, "key1", "This is another replacement text?");
		$a = dbmfetch($db_file, "key1");
		dbmclose($db_file);
		echo $a;
	} else {
		echo "Error creating database\n";
	}
?>
--EXPECT--
This is the replacement text