You are here

function _apdqc_install_human2byte in Asynchronous Prefetch Database Query Cache 7

Converts a human readable file size value to a number of bytes.

Parameters

array $m: Matches from preg_replace_callback.

Return value

string The number of bytes.

1 string reference to '_apdqc_install_human2byte'
apdqc_install_human2byte in ./apdqc.install
Converts a human readable file size value to a number of bytes.

File

./apdqc.install, line 1786
Handles APDQC installation and status checks.

Code

function _apdqc_install_human2byte(array $m) {
  switch (strtolower($m[2])) {
    case 't':
      $m[1] *= 1024;
    case 'g':
      $m[1] *= 1024;
    case 'm':
      $m[1] *= 1024;
    case 'k':
      $m[1] *= 1024;
  }
  return $m[1];
}