PHP code example of negasus / numeral-system
1. Go to this page and download the library: Download negasus/numeral-system library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
negasus / numeral-system example snippets
php
$numeralSystem = new Negasus\NumeralSystem(); // Default alphabet
echo $numeralSystem->encode(1048576); // see: 4OmW
$numeralSystem->setAlphabet($numeralSystem::ALPHABET_HEX);
echo $numeralSystem->encode(172224397); // see: A43EF8D
$numeralSystem->setAlphabet('AbCd');
echo $numeralSystem->encode(172224397); // see: CCbAAddCddCAdb