sy-records/alphaid

Create Youtube-Like IDs With PHP.

Fund package maintenance!
donate.qq52o.me

v1.0.1 2021-08-12 08:35 UTC

This package is auto-updated.

Last update: 2022-12-01 00:07:54 UTC


README

Install

composer require sy-records/alphaid

Usage

use Luffy\AlphaID;

$id = new AlphaID();
$code = $id->encode(PHP_INT_MAX);
var_dump($code, $id->decode($code));

$code = $id->encode(PHP_INT_MAX, PHP_VERSION_ID);
var_dump($code, $id->decode($code));

$code = $id->encode([PHP_INT_MAX, PHP_VERSION_ID]);
var_dump($code, $id->decode($code));