public function getLength($input)
    {
        if (is_scalar($input)) {
            if ($this->countByChars) {
                return mb_strlen($input, $this->charset);
            } else {
                return strlen($input);
            }
        } elseif (is_array($input) || $input instanceof \Countable) {
            return count($input);
        } else {
            return false;
        }
    }
public function getLength($input)
    {
        if (is_scalar($input)) {
            if ($this->countByChars) {
                return mb_strlen($input, $this->charset);
            } else {
                return strlen($input);
            }
        } elseif (is_array($input) || $input instanceof \Countable) {
            return count($input);
        } else {
            return false;
        }
    }
public function getLength ( $ input ) { if ( is_scalar ( $ input ) ) { if ( $ this -> countByChars ) { return mb_strlen ( $ input , $ this -> charset ) ; } else { return strlen ( $ input ) ; } } elseif ( is_array ( $ input ) || $ input instanceof \ Countable ) { return count ( $ input ) ; } else { return false ; } }
Return the input's length or false when could not detected

@param string|array|\Countable $input
@return int|false
Return the input s length or false when could not detected