Same name in other branches
- 8.x-2.x advagg_css_minify/yui/CSSMin.inc \CSSmin::normalize_int()
Convert strings like "64M" or "30" to int values
Parameters
mixed $size:
Return value
int
2 calls to CSSmin::normalize_int()
- CSSmin::do_raise_php_limits in advagg_css_minify/
yui/ CSSMin.inc - Try to configure PHP to use at least the suggested minimum settings
- CSSmin::set_memory_limit in advagg_css_minify/
yui/ CSSMin.inc - Sets the memory limit for this script
File
-
advagg_css_minify/
yui/ CSSMin.inc, line 779
Class
Code
private function normalize_int($size) {
if (is_string($size)) {
switch (substr($size, -1)) {
case 'M':
case 'm':
return (int) $size * 1048576;
case 'K':
case 'k':
return (int) $size * 1024;
case 'G':
case 'g':
return (int) $size * 1073741824;
}
}
return (int) $size;
}