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