dev-master
9999999-devbase62 encode integer as a string and decode the string back to an integer
MIT
The Development Requires
by Ajepe Babatope De Immaculate
base62 encode integer as a string and decode the string back to an integer
Base is a small package that encodes integer to a string and decodes the same string back to an integer, this is can useful in making URL shortening application or generating unique URL slug. It convert the int id to base 62 characters with the encode method and converts it back to an integer with the decode public method., (*2)
Via Composer ``` bash composer require ajepe/base62:0.0.2, (*3)
### Usage ``` php require 'vendor/autoload.php'; $encode = new Base\Encode(); $decode = new Base\Decode(); $encode = $encode->encode(PHP_INT_MAX); //return HXy0p9 $decode = $decode->decode($encode); // return 24815682095 printf('The encode value of %s map directly to %s', $encode, $decode);
README.md, CHANGELOG.md, CONTRIBUTING.md, LICENSE.txt and composer.json, (*4)
Please see CHANGELOG for more information what has changed recently., (*5)
base62 encode integer as a string and decode the string back to an integer
MIT