PHP code example of owenvoke / convert
1. Go to this page and download the library: Download owenvoke/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/ */
owenvoke / convert example snippets
use OwenVoke\Convert\Bytes;
// Metric standard format
Bytes::toInt('1B');
// IEC standard format
Bytes::toInt('1GiB');
use OwenVoke\Convert\Bytes;
// This is always formatted as metric in the output
Bytes::toString(1000);