Constant Database (CDB) wrapper library for PHP. Provides pure-PHP fallback when dba_* functions are absent.
CDB, short for "constant database", refers to a very fast and highly
reliable database system which uses a simple file with key value pairs. This
library wraps the CDB functionality exposed in PHP via the
In cases where
dba_* functions are not present or are not compiled with CDB
support, a pure-PHP implementation is provided for falling back.
Additional documentation about the library can be found on MediaWiki.org.
// Reading a CDB file $cdb = \Cdb\Reader::open( 'db.cdb' ); $foo = $cdb->get( 'somekey' ); // Writing to a CDB file $cdb = \Cdb\Writer::open( 'anotherdb.cdb' ); $cdb->set( 'somekey', $foo );
composer install --prefer-dist composer test