Horje
php convert mb to bytes Code Example
php convert mb to bytes
function toByteSize($p_sFormatted) {
    $aUnits = array('B'=>0, 'KB'=>1, 'MB'=>2, 'GB'=>3, 'TB'=>4, 'PB'=>5, 'EB'=>6, 'ZB'=>7, 'YB'=>8);
    $sUnit = strtoupper(trim(substr($p_sFormatted, -2)));
    if (intval($sUnit) !== 0) {
        $sUnit = 'B';
    }
    if (!in_array($sUnit, array_keys($aUnits))) {
        return false;
    }
    $iUnits = trim(substr($p_sFormatted, 0, strlen($p_sFormatted) - 2));
    if (!intval($iUnits) == $iUnits) {
        return false;
    }
    return $iUnits * pow(1024, $aUnits[$sUnit]);
}




Php

Related
add pagination to wordpress Code Example add pagination to wordpress Code Example
laravel test dbms connection Code Example laravel test dbms connection Code Example
Get the current page address Code Example Get the current page address Code Example
how to check migration status in laravel Code Example how to check migration status in laravel Code Example
create controller laravel with model Code Example create controller laravel with model Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8