PHP code example of amneale / byteform
1. Go to this page and download the library: Download amneale/byteform 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/ */
amneale / byteform example snippets
$parser = new \Amneale\ByteForm\ByteParser();
$parser->parseBytes("1.5KB"); // int(1536)
$formatter = new \Amneale\ByteForm\ByteFormatter();
$formatter->formatBytes(1536); // "1.50KB"
$formatter->formatBytes(1536, 1); // "1.5KB"