PHP code example of smart-lib / base-converter

1. Go to this page and download the library: Download smart-lib/base-converter 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/ */

    

smart-lib / base-converter example snippets

 php
$converter = new SmartLib/BaseConverter();
echo $converter->convert('100500', 10, 36);
echo $converter->convert('-100500', 10, 36);
echo $converter->convert('100500.99', 10, 64);
 php
   $converter = new SmartLib/BaseConverter();
   echo $converter
       ->from(10)
       ->to(6, 'QWERTY')
       ->convert('100500', 10, 6);
   
 php
$converter = new SmartLib/BaseConverter();
echo $converter
    ->from(10)
    ->to(36, null, ',', '~')
    ->convert('-100.500', 10, 36);