PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of Michael Richey   AnyBase   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: AnyBase
Encode and decode numbers in any base up to 65
Author: By
Last change: Update README.md
Update README.md
Update README.md
Date: 8 years ago
Size: 463 bytes
 

Contents

Class file image Download

Create a base numbering system to meet your needs.

Designed to create short urls based on a decimal id number - the default charset contains the unreserved URL characters and is good up to base65.

Using AnyBase is simple. Simply, initialize an object with or without a charset and use it to encode or decode a number.

$b65 = new AnyBase();

$original = 1000000;

$encoded = $b65->encode($original); // '3FIE'

$decoded = $b65->decode($encoded); // 1000000