sy-records / alphaid
Create Youtube-Like IDs With PHP.
Fund package maintenance!
donate.qq52o.me
sy-records
Requires
- php: >=7.0
- ext-ctype: *
Suggests
- ext-bcmath: Required to use bcadd
- ext-gmp: Required to use gmp_add
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));