PHP code example of arokettu / kilo-mega

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

    

arokettu / kilo-mega example snippets



use function \Arokettu\KiloMega\format_metric;
echo format_metric(1000, suffix: 'W'); // 1.0 kW


use function \Arokettu\KiloMega\format_bytes;
echo format_bytes(1234); // 1.2 KiB