Same name in other branches
  1. 8.x-2.x advagg_css_minify/yui/CSSMin.inc \CSSmin::normalize_int()

Convert strings like "64M" or "30" to int values

Paramètres

mixed $size:

Return value

int

2 calls to CSSmin::normalize_int()
CSSmin::do_raise_php_limits dans advagg_css_minify/yui/CSSMin.inc
Try to configure PHP to use at least the suggested minimum settings
CSSmin::set_memory_limit dans advagg_css_minify/yui/CSSMin.inc
Sets the memory limit for this script

Fichier

advagg_css_minify/yui/CSSMin.inc, line 779

Classe

CSSmin

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;
}