A performance-optimized PHP library for ASCII string manipulation, transliteration, and slug generation without requiring mbstring or iconv extensions.
Portable ASCII is a PHP library that provides a comprehensive set of ASCII string functions, including transliteration, slug generation, and character normalization. It enables developers to handle non-ASCII text in a portable, dependency-free manner, making it ideal for internationalization and text processing tasks.
PHP developers working on applications that require processing multilingual text, such as generating URL slugs from non-English strings, cleaning user input, or normalizing text for storage or display. It is particularly useful for projects needing to run in environments without extensions like mbstring or iconv.
Developers choose Portable ASCII because it is a self-contained, dependency-free solution that works without external PHP extensions, ensuring portability across diverse server environments. It offers language-specific transliteration for over 60 languages, optimized performance, and easy integration through static methods.
🔡 Portable ASCII library - performance optimized (ascii) string functions for PHP.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Works without mbstring, iconv, or other PHP extensions, relying only on PCRE, ensuring compatibility across diverse PHP 7+ environments as emphasized in the README.
Provides language-specific ASCII mappings for over 60 languages, enabling accurate transliteration, such as converting 'Düsseldorf' to 'Duesseldorf' for German or 'Dusseldorf' for English.
Includes functions for normalizing whitespace, removing invisible characters, and handling MS Word special characters, covering common internationalization and sanitization needs.
Uses static methods and efficient algorithms for high-speed string processing, making it suitable for applications with moderate text manipulation requirements.
Converts all text to ASCII, stripping non-Latin characters, which may not suit applications needing full Unicode preservation or cultural accuracy in transliteration.
The API relies on static methods, complicating testing and dependency injection in object-oriented codebases, as noted in the README's alternative suggestion to use voku/Stringy.
As a pure PHP implementation, it can be slower than native extensions like mbstring for large-scale or real-time text processing, despite optimization claims.