2000-08-27 19:46:06 +00:00
|
|
|
--TEST--
|
|
|
|
DBM FirstKey/NextKey Loop Test With 5 Items
|
2000-10-23 07:40:05 +00:00
|
|
|
--SKIPIF--
|
|
|
|
<?php if (!extension_loaded("db")) print "skip"; ?>
|
2000-08-27 19:46:06 +00:00
|
|
|
--POST--
|
|
|
|
--GET--
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
dbmopen("./test.dbm","n");
|
|
|
|
dbminsert("./test.dbm","key1","Content String 1");
|
|
|
|
dbminsert("./test.dbm","key2","Content String 2");
|
|
|
|
dbminsert("./test.dbm","key3","Third Content String");
|
|
|
|
dbminsert("./test.dbm","key4","Another Content String");
|
|
|
|
dbminsert("./test.dbm","key5","The last content string");
|
|
|
|
$a = dbmfirstkey("./test.dbm");
|
|
|
|
$i=0;
|
|
|
|
while($a) {
|
|
|
|
$a = dbmnextkey("./test.dbm",$a);
|
|
|
|
$i++;
|
|
|
|
}
|
|
|
|
dbmclose("./test.dbm");
|
|
|
|
echo $i
|
|
|
|
?>
|
|
|
|
--EXPECT--
|
|
|
|
5
|