Repository navigation
Releases: nabeghe/alphanum-php
Releases · nabeghe/alphanum-php
Release list
v2.0.0
What's Changed in v2.0.0
-
Complete Default Alphabet: Default
CHARSnow includes all 63 characters (0-9,A-Z,a-z,_) with dynamic base resolution. -
Predefined Alphabet Presets: Added
BASE60(legacy sexagesimal compatibility),BASE62,BASE58(Bitcoin style), andBASE36. -
Arbitrary-Precision BigInt: Seamlessly handles numbers beyond
PHP_INT_MAXvia GMP, BCMath, or pure-PHP fallback (toBigDecimal,decode). -
Performance Boost: Up to ~3M ops/sec using
$O(1)$ memoized lookup tables and optimized string allocation. -
New Features: Added output padding (
pad,unpad), format validation (isValid), and an Object-Oriented Instance API. - PHP Compatibility: Full support across PHP 7.4 through PHP 8.5+ backed by a 100% passing PHPUnit test suite and CI matrix.
Upgrading from v1.x
If you need identical output to v1.x sexagesimal encoding, pass Alphanum::BASE60 as the alphabet parameter:
Alphanum::generate($number, Alphanum::BASE60);
Alphanum::toDecimal($string, Alphanum::BASE60);