PHP Classes
elePHPant
Icontem

PHP Number to Text Converter: Encode and decode numbers using character mappings

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2015-07-20 (1 year ago) RSS 2.0 feedNot yet rated by the usersTotal: 322 All time: 6,822 This week: 1,095Up
Version License PHP version Categories
number-converter 1.0GNU General Publi...5.4PHP 5, Text processing, Math
Description Author

This class can encode and decode numbers using character mappings.

It can take a given number and encode it using a given list of characters to map the number.

The numbers may be encoded using pre-defined characters sets like upper or lower case letters, digits including 0 or not, and underscore or dash symbols. A custom list of characters may also be included.

The class can also do the opposite, i.e. take a previously encoded number with given character sets and decode the original number.

The class uses arbitrary precision math to allow for very long numbers to be converted.

Innovation Award
PHP Programming Innovation award nominee
August 2015
Number 13
One way to store large numbers with less digits is to represent than in a base higher than 10.

This means that it would use other characters besides 0 to 9 to represent the number in higher base.

This class can convert decimal numbers to be encoded with custom lists of characters to represent their "digits".

It uses arbitrary precision math, so it can represent arbitrary long decimal numbers with much less characters.

Manuel Lemos
Picture of Ivan Gontarenko
  Performance   Level  
Name: Ivan Gontarenko <contact>
Classes: 1 package by
Country: Ukraine Ukraine
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example Example usage NumConverter class
Plain text file NumConverter.php Class NumConverter PHP class

 Version Control Unique User Downloads Download Rankings  
 0%
Total:322
This week:0
All time:6,822
This week:1,095Up