yogcloud / alphaid
Create Youtube-Like IDs With PHP.
v1.1.2
2022-03-31 03:38 UTC
Requires
- php: >=7.0
- ext-ctype: *
Suggests
- ext-bcmath: Required to use bcadd
- ext-gmp: Required to use gmp_add
README
Install
composer require youcloud/alphaid
Usage
use YogCloud\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));