PHP code example of artbit / base_convert

1. Go to this page and download the library: Download artbit/base_convert 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/ */

    

artbit / base_convert example snippets


echo math\base_convert(100, 10, 16); 
// echoes '64'

echo math\base_convert(64, 16, 10); 
// echoes '100'

echo math\base_convert(1234567890, 10, 'customizable');
// echoes 'slmmmmcui'

echo math\base_convert('slmmmmcui', 'customizable', 'isogram');
// echoes 'rorsirrioig'

echo math\base_convert('rorsirrioig', 'isogram', 10);
// echoes '1234567890'