PHP Classes
elePHPant
Icontem

PHP Convert Base36: Encode and decode data using Base36 encoding

Recommend this page to a friend!

  Author Author  
Name: Chun-Sheng, Li <contact>
Classes: 5 packages by
Country: Taiwan Taiwan
Innovation award
Innovation award
Nominee: 1x


  Detailed description   Download Download .zip .tar.gz  
This class can encode and decode data using Base36 encoding.

It can take a string of data and encodes it using the Base36 encoding.

The class can also do the opposite, i.e. decode a string previously encoded using Base36 encoding and revert to the original data string.

Details

Base36

[![Latest Version on Packagist][ico-version]][link-packagist] [![Software License][ico-license]](LICENSE.md) [![Build Status][ico-travis]][link-travis] [![Coverage Status][ico-scrutinizer]][link-scrutinizer] [![Quality Score][ico-code-quality]][link-code-quality] [![Total Downloads][ico-downloads]][link-downloads]

Base36 string encode and decode.

Installation

Via Composer

$ composer require odan/base36

Requirements

  • PHP 7.0+

Usage

use Odan\Encoding\Base36;

$str = "abc 1234";

// Encode
$base36 = new Base36();
$enc = $base36->encode($str); // MFRGGIBRGIZTI====

// Decode
echo $base36->decode($enc); // abc 1234

Without padding and only lowercase

$str = "abc 1234";

// Encode
$enc = $base36->encode($str, false);
$enc = strtolower($enc); // mfrggibrgizti

// Decode
echo $base36->decode(strtoupper($enc));

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Credits

  • Bryan Ruiz

License

The MIT License (MIT). Please see License File for more information.

[ico-version]: https://img.shields.io/packagist/v/odan/base36.svg?style=flat-square [ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square [ico-travis]: https://img.shields.io/travis/odan/base36/master.svg?style=flat-square [ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/odan/base36.svg?style=flat-square [ico-code-quality]: https://img.shields.io/scrutinizer/g/odan/base36.svg?style=flat-square [ico-downloads]: https://img.shields.io/packagist/dt/odan/base36.svg?style=flat-square

[link-packagist]: https://packagist.org/packages/odan/base36 [link-travis]: https://travis-ci.org/odan/base36 [link-scrutinizer]: https://scrutinizer-ci.com/g/odan/base36/code-structure [link-code-quality]: https://scrutinizer-ci.com/g/odan/base36 [link-downloads]: https://packagist.org/packages/odan/base36 [link-author]: https://github.com/:author_username [link-contributors]: ../../contributors


  Classes of Chun-Sheng, Li  >  PHP Convert Base36  >  Download Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: PHP Convert Base36
Base name: base36
Description: Encode and decode data using Base36 encoding
Version: -
PHP version: 5
License: MIT/X Consortium License
 
  Groups   Applications   Files Files  

  Groups  
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Text processing Manipulating and validating text data View top rated classes


  Applications that use this package  
No pages of applications that use this class were specified.

Add link image If you know an application of this package, send a message to the author to add a link here.

  Files folder image Files  
File Role Description
Files folder imagesrc (1 directory)
Files folder imagetests (2 files)
Accessible without login Plain text file .scrutinizer.yml Data Auxiliary data
Accessible without login Plain text file .styleci.yml Data Auxiliary data
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file build.xml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file CONDUCT.md Data Auxiliary data
Accessible without login Plain text file CONTRIBUTING.md Data Auxiliary data
Accessible without login Plain text file LICENSE.md Lic. License text
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
Files folder imageEncoding (1 file)

  Files folder image Files  /  src  /  Encoding  
File Role Description
  Plain text file Base36.php Class Class source

  Files folder image Files  /  tests  
File Role Description
  Plain text file Base36Test.php Class Class source
  Accessible without login Plain text file test.php Example Example script

Download Download all files: base36.tar.gz base36.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.