aellopus/client

Official Aellopus client for PHP — a synchronous, zero-dependency AWP/1 client.

Maintainers

Package info

github.com/Aellopus/php-aellopus

pkg:composer/aellopus/client

Fund package maintenance!

adibhauzan

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-06-26 09:24 UTC

This package is not auto-updated.

Last update: 2026-06-27 08:03:12 UTC


README

Official, synchronous, zero-dependency PHP client for Aellopus over the AWP/1 wire protocol.

Stable. See CHANGELOG.md for release notes.

Requirements

  • PHP ^8.2 (64-bit)

Install

composer require aellopus/client

Usage

use Aellopus\Client\Client;
use Aellopus\Client\Exception\NotFoundError;

$client = Client::connect('127.0.0.1:6969'); // timeoutMs defaults to 5000

$client->set('user:1', 'John');
echo $client->get('user:1');                 // "John"

try {
    $client->get('absent');
} catch (NotFoundError) {
    // a miss is distinct from an empty value
}

$client->set('counter', '0');
$client->incr('counter');                     // 1

// Lazily walk the keyspace:
foreach ($client->scan('user:*') as $key) {
    echo $key, PHP_EOL;
}

$client->close();

Values are raw bytes — they may contain CR, LF, or NUL and round-trip byte-exact. An empty string "" is a stored value (a hit), never a miss.

License

Apache-2.0