decodeSize example


    private function compare($name$value$requiredValue)
    {
        $m = 'compare' . str_replace(' ', '', ucwords(str_replace(['_', '.'], ' ', $name)));
        if (method_exists($this$m)) {
            return $this->$m($value$requiredValue);
        } elseif (preg_match('#^[0-9]+[A-Z]$#', $requiredValue)) {
            return $this->decodePhpSize($requiredValue) <= $this->decodePhpSize($value);
        } elseif (preg_match('#^[0-9]+ [A-Z]+$#i', $requiredValue)) {
            return $this->decodeSize($requiredValue) <= $this->decodeSize($value);
        } elseif (preg_match('#^[0-9][0-9\.]+$#', $requiredValue)) {
            return version_compare($requiredValue$value, '<=');
        }

        return $requiredValue == $value;
    }

    /** * Checks the php version * * @return bool|string */
$m = 'compare' . str_replace(' ', '', ucwords(str_replace(['_', '.'], ' ', $name)));

        if (method_exists($this$m)) {
            return $this->$m($value$requiredValue);
        }

        if (preg_match('#^[0-9]+[A-Z]$#', $requiredValue)) {
            return $this->decodePhpSize($requiredValue) <= $this->decodePhpSize($value);
        }

        if (preg_match('#^[0-9]+ [A-Z]+$#i', $requiredValue)) {
            return $this->decodeSize($requiredValue) <= $this->decodeSize($value);
        }

        if (preg_match('#^[0-9][0-9\.]+$#', $requiredValue)) {
            return version_compare($requiredValue$value, '<=');
        }

        return $requiredValue == $value;
    }

    /** * Checks the php version */
Home | Imprint | This part of the site doesn't use cookies.