Last Updated | | Ratings | | Unique User Downloads | | Download Rankings |
2016-04-11 (6 months ago)  | | Not enough user ratings | | Total: 132 | | All time: 8,285 This week: 871 |
|
Description | | Author |
This class can encode and decode numbers in any base up to 65, where PHP base_convert only works up to 36.
It can take a given number and convert it into a text string made of characters that represent that number in any number base.
The class can also take a previously encoded number as text string and retrieve the original number value. | |
|
Details
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
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.