PHPackages                             zteradb/zteradb-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. zteradb/zteradb-php

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

zteradb/zteradb-php
===================

High-performance async PHP client for ZTeraDB utilizing raw TCP socket transport layer.

v2.0.0(1mo ago)018proprietaryPHPPHP &gt;=7.2

Since Nov 24Pushed 1mo agoCompare

[ Source](https://github.com/zteradb/zteradb-php)[ Packagist](https://packagist.org/packages/zteradb/zteradb-php)[ RSS](/packages/zteradb-zteradb-php/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (2)Versions (4)Used By (0)

ZTeraDB PHP Client
==================

[](#zteradb-php-client)

The official PHP client for **ZTeraDB**—a unified database abstraction platform. This library enables you to connect to your existing data infrastructure and execute queries seamlessly using **ZTeraDB Query Language (ZQL)**.

Technical Overview
------------------

[](#technical-overview)

This package implements a performance-optimized, ZQL-first PHP client utilizing a raw TCP socket transport layer.

To ensure low-overhead binary framing, the client communicates with the ZTeraDB server using **4-byte big-endian length-prefixed payloads** containing structured JSON data. This underlying transport architecture eliminates HTTP overhead, offering high-throughput query execution directly from your PHP runtime.

---

🧠 Architecture Overview
-----------------------

[](#-architecture-overview)

You never connect to your backend databases directly. ZTeraDB handles all connections, cryptographic signing, proxy routing, and query execution securely behind the scenes.

> **Your App** ➔ **ZTeraDB PHP Client** ➔ **ZTeraDB Server** ➔ **Your Databases**

---

Key Features
------------

[](#key-features)

- **Unified Access:** Query multiple existing databases through a single interface.
- **Type-Safe &amp; Standardized:** Receive predictable, structured payloads regardless of the underlying data source.
- **Lightweight:** Built with minimal overhead, supporting modern PHP environments (7.2+).

---

Table of Contents
-----------------

[](#table-of-contents)

1. [Key Features](#key-features)
2. [Prerequisites &amp; Requirements](#-prerequisites--requirements)
3. [Installation](#installation)
4. [Usage](#usage)
5. [Documentation Sections](#-documentation-sections)
6. [Licence](#licence)

---

⭐ Key Features
--------------

[](#-key-features)

- 🚀 **Unified Query Language (ZQL):** Write once, run on any database (PostgreSQL, MySQL, MSSQL, etc.).
- 🔌 **Easy Integration:** Seamlessly plugs into any PHP application or framework (Laravel, Symfony, CodeIgniter).
- ⚙️ **Auto-Managed Connections:** Handles connection pooling and automatic retries behind the scenes.
- 🔐 **Secure Authentication:** Protected via client, access, and secret keys with cryptographic signing.
- 🎯 **Clean Query Builder:** Fluent interface for standard CRUD operations (`insert`, `select`, `update`, `delete`).
- 🔍 **Advanced Filtering:** Built-in support for complex logical and mathematical filters.
- 🧵 **Streamed Results:** Efficiently memory-manages large datasets using PHP generators.
- 📦 **Type-Safe &amp; Standardized:** Receive predictable, structured payloads regardless of the underlying data source.

---

🛠 Prerequisites &amp; Requirements
----------------------------------

[](#-prerequisites--requirements)

RequirementSpecification**PHP Version**PHP 7.2 or higher (Download from [php.net](https://www.php.net/downloads.php))**Extensions**`sockets` extension must be enabled in your `php.ini` file**Package Registry**Available via [Packagist](https://packagist.org)---

Installation
------------

[](#installation)

### Option 1: Via Composer (Recommended)

[](#option-1-via-composer-recommended)

Run the following command in your terminal to install the ZTeraDB client:

```
# Using composer
composer require zteradb/zteradb-php
```

### Option 2: From GitHub Repository

[](#option-2-from-github-repository)

Alternatively, you can pull the package directly from GitHub. Add the repository to your `composer.json` file:

```
{
  "repositories": [
    {
      "type": "vcs",
      "url": "[https://github.com/zteradb/zteradb-php](https://github.com/zteradb/zteradb-php)"
    }
  ],
  "require": {
    "zteradb/zteradb-php": "v1.0"
  }
}
```

Then, run the installation command:

```
composer require zteradb/zteradb-php:v2.0.0
```

---

🚀 60-Second Quick Start

```
