Base36 string encode and decode.
Via Composer
$ composer require odan/base36
- PHP 7.0+
use Odan\Encoding\Base36;
$str = "abc 1234";
// Encode
$base36 = new Base36();
$enc = $base36->encode($str); // MFRGGIBRGIZTI====
// Decode
echo $base36->decode($enc); // abc 1234
$str = "abc 1234";
// Encode
$enc = $base36->encode($str, false);
$enc = strtolower($enc); // mfrggibrgizti
// Decode
echo $base36->decode(strtoupper($enc));
$ composer test
Please see CONTRIBUTING and CONDUCT for details.
- Bryan Ruiz
The MIT License (MIT). Please see License File for more information.