phlib/base_convert
Drop-in replacement for PHP base_convert that supports arbitrarily large numbers without silent failures. Convert big numeric strings between bases (e.g., 10↔36) reliably via Phlib\base_convert, and round-trip large values correctly.
Feature Development:
base_convert() fails silently (e.g., financial data, blockchain IDs, or cryptographic hashes).Roadmap Alignment:
Build vs. Buy:
Use Cases:
gmp or bcmath) for environments where those extensions are unavailable or overkill.Adopt If:
base_convert() limits (e.g., >19 digits in base-10), causing silent failures or data corruption.base_convert(10, 36) must exactly reverse base_convert(36, 10)).composer require).Look Elsewhere If:
gmp or bcmath for higher bases).gmp or bcmath suffice and are already in your dependency tree (but note: they have broader functionality and may introduce complexity).For Executives:
*"This package resolves a critical but hidden technical risk: PHP’s native base_convert() silently fails on large numbers, leading to data corruption in workflows like ID generation, financial calculations, or cryptographic operations. By adopting this lightweight, actively maintained solution, we:
For Engineering:
*"This replaces PHP’s unreliable base_convert() with a drop-in solution that:
composer.json today for systems processing base conversions (e.g., encoding IDs, hashes, or legacy data). Benchmark against gmp only if you need bases >36; otherwise, this is the simplest, most maintainable path.
Caveat: Requires PHP ≥7.4 and may expose existing error-handling gaps (native base_convert() silently fails; this throws exceptions). Test thoroughly!"*For Product/Design: *"This enables reliable data encoding for features like:
How can I help you explore Laravel packages today?