/** * returns the pbxt engine specific handling for * PMA_ENGINE_DETAILS_TYPE_SIZE variables. * * @param string $formatted_size the size expression (for example 8MB) * * @return string the formatted value and its unit */ function resolveTypeSize($formatted_size) { if (preg_match('/^[0-9]+[a-zA-Z]+$/', $formatted_size)) { $value = PMA_extractValueFromFormattedSize($formatted_size); } else { $value = $formatted_size; } return PMA_formatByteDown($value); }
function testExtractValueFromFormattedSizeK() { $this->assertEquals(262144, PMA_extractValueFromFormattedSize("256K")); }