berkeleydb example.
<?php
# DB4 CREATE & INSERT
$_FILE = "/DATA_DIR/TEST_DATA.DB";
$DIV = "\xFE";
$inValue = "name".$DIV."0".$DIV."test value";
$dbh = dba_open($_FILE,"c","db4");
dba_close($dbh);
$dbh = dba_open($_FILE,"w","db4");
dba_insert(1,$inValue,$dbh);
dba_close($dbh);
?>