Download the PHP package pikaid/pikaid-php without Composer

On this page you can find all versions of the php package pikaid/pikaid-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pikaid-php

PikaID

[![License: LGPL-3.0-or-later](https://img.shields.io/badge/license-LGPL--3.0--or--later-blue.svg)](LICENSE) [![PHP](https://img.shields.io/badge/PHP-modern-777bb4.svg)](#)

PikaID is a tiny PHP library that creates unique, short, and sortable IDs
a modern alternative to UUIDs for your databases, APIs, and distributed systems.

💡 Example Use Case

Imagine you’re building a web app where users can post messages or create orders.
Each new item needs a unique ID so your system can recognize it.

If you use normal numbers (1, 2, 3…), you can have conflicts when several servers create data at the same time.
If you use UUIDs, you get long, messy IDs that are hard to read and don’t follow creation time.

PikaID solves this:

You can use PikaID to:

In short: PikaID gives you clean, safe, and sortable IDs for anything that needs a unique reference.

pikaid

Pikaid (PHP)

Small · Sortable · Secure ID generator

This is the official PHP implementation. Fully compliant with v1.0.3.

Pikaid is a 26-character, lowercase Base36 identifier, composed of:

It’s a modern, compact alternative to UUID and ULID:

pikaid structure


📚 Specifications & Benchmarks

See the full technical specs and benchmarks at pikaid/pikaid-specs


⚙️ Requirements


📦 Installation

Install via Composer:

Include Composer's autoloader in your project:


🚀 Basic Usage


🧩 API Reference

Pikaid::generate(): string

Generate a new 26-character string ID.


Pikaid::generateBinary(): string

Generate the binary form directly (BINARY(17)).


Pikaid::toBinary(string $id): string

Convert a string ID to its binary (17 bytes) representation. Throws InvalidArgumentException if the input is not a valid 26-character Pikaid or if the timestamp is out of range.


Pikaid::fromBinary(string $bin): string

Convert binary (17 bytes) back into a 26-char string. Throws InvalidArgumentException if the binary length isn’t exactly 17 bytes.


Pikaid::isValid(string $id): bool

Check if the given string is a valid Pikaid.


Pikaid::parse(string $id): array

Parse a string ID into its components:

Throws InvalidArgumentException on invalid input.


Pikaid::fromDateTime(DateTimeInterface $t): string

Generate a string ID for a specific timestamp (seconds precision).


🔄 Order Guarantee


🛢 Storage Recommendations

Pikaid is designed to be compact and index-friendly, with a predictable layout:

Representation Size Sortable Recommended for
BINARY(17) 17B Yes High-performance storage and indexing
CHAR(26) 26B Yes Readability in SQL, debugging, or logs

🔹 Option 1: Store as BINARY(17) (Recommended)

Binary form stores exactly 17 bytes:

Table Definition

Insert Example (PHP)

Select Example (PHP)

Benefits


🔹 Option 2: Store as CHAR(26) (String)

If you need IDs to remain human-readable directly in SQL queries, store the string form.

Table Definition

Insert Example (PHP)

Select Example (PHP)

Notes


🔄 Order Guarantee

Both BINARY(17) and CHAR(26) maintain natural chronological order:


📄 License

PikaID is free software licensed under the GNU Lesser General Public License, version 3 or any later version (LGPL-3.0-or-later).

In practical terms: you can use this library in both open-source and proprietary applications. You can integrate it into your own codebase, extend it, subclass it, and build commercial or closed-source software on top of it without having to release your whole application under the LGPL.

The main condition is about the library itself:

This is an intentional choice: the goal is to keep the library easy to adopt in real-world PHP projects while ensuring that improvements to the core engine are contributed back when they are distributed.

For the exact legal terms, see the LICENSE file.


✉️ Contact

For licensing or project-related questions: [email protected]


All versions of pikaid-php with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pikaid/pikaid-php contains the following files

Loading the files please wait ...