PHPackages                             simplito/ldba-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. simplito/ldba-php

ActiveLibrary[Database &amp; ORM](/categories/database)

simplito/ldba-php
=================

LDBA is a high-performance, low-memory-footprint, single-file embedded database for key/value storage

1.0.0(8y ago)14894[2 issues](https://github.com/simplito/ldba-php/issues)[1 PRs](https://github.com/simplito/ldba-php/pulls)MITPHP

Since Feb 27Pushed 5y ago4 watchersCompare

[ Source](https://github.com/simplito/ldba-php)[ Packagist](https://packagist.org/packages/simplito/ldba-php)[ RSS](/packages/simplito-ldba-php/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

LDBA - a fast, pure PHP, key-value database.
============================================

[](#ldba---a-fast-pure-php-key-value-database)

Information
-----------

[](#information)

LDBA is a high-performance, low-memory-footprint, single-file embedded database for key/value storage and retrieval written in pure PHP.

It is inspired by Erlang's Dets and Berkeley DB sofware and includes implementation of [extended linear hashing](https://en.wikipedia.org/wiki/Linear_hashing) for fast key/value access and implementation of a fast [buddy storage allocator](https://en.wikipedia.org/wiki/Buddy_memory_allocation) for file space management.

LDBA supports insertion and deletion of records and lookup by exact key match only. Applications may iterate over all records stored in a database, but the order in which they are returned is undefined. Fault tolerance is achieved by automatic crash recovery thanks to transactional style writes. The size of LDBA files cannot exceed 2GB.

LDBA provides functions compatible with [php\_dba](http://php.net/manual/en/book.dba.php) (Database Abstraction Layer) for easy adoption in existing software.

Requirements: PHP 5.4+

The library is being used, for example, as base storage interface in the [PrivMX WebMail](https://privmx.com) software.

Instalation
-----------

[](#instalation)

Run the following command to install the lib via composer:

```
composer require simplito/ldba-php

```

An example
----------

[](#an-example)

```
$dbh = ldba_open("test.ldb", "c");
if (ldba_exists("counter", $dbh)) {
    $counter = intval(ldba_fetch("counter", $dbh));
} else {
    $counter = 0;
}
ldba_replace("counter", $counter + 1);
ldba_close($dbh);
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2998d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fedd5aff9bf640bd8f0209f8da7b2a290350af0e6ff4a722f60634c275e9ec18?d=identicon)[ldudzinski](/maintainers/ldudzinski)

---

Top Contributors

[![ldudzsim](https://avatars.githubusercontent.com/u/26061479?v=4)](https://github.com/ldudzsim "ldudzsim (1 commits)")

---

Tags

databaseembedded-databasephpstorage

### Embed Badge

![Health badge](/badges/simplito-ldba-php/health.svg)

```
[![Health](https://phpackages.com/badges/simplito-ldba-php/health.svg)](https://phpackages.com/packages/simplito-ldba-php)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
