### Composer Installation Source: https://github.com/voku/portable-ascii/blob/master/README.md Installs project dependencies using Composer. ```bash composer install ``` -------------------------------- ### Install Portable ASCII via Composer Source: https://github.com/voku/portable-ascii/blob/master/README.md Provides the Composer command to install the Portable ASCII library into your PHP project. ```shell composer require voku/portable-ascii ``` -------------------------------- ### Install Portable ASCII via Composer Source: https://github.com/voku/portable-ascii/blob/master/build/docs/base.md Provides the Composer command to install the Portable ASCII library into your PHP project. ```shell composer require voku/portable-ascii ``` -------------------------------- ### Transliteration Example (Portable ASCII vs. Stringy) Source: https://github.com/voku/portable-ascii/blob/master/README.md Demonstrates the transliteration functionality of Portable ASCII compared to the Stringy library. Both achieve the same result of converting accented and non-ASCII characters to their closest ASCII equivalents. ```php toTransliterate(); // 'deja sss iiii' ``` -------------------------------- ### ASCII Conversion Example: to_ascii() Source: https://github.com/voku/portable-ascii/blob/master/build/docs/base.md Illustrates the use of the `ASCII::to_ascii()` static method for converting strings containing special characters to their ASCII representations, with language-specific transliteration rules. ```php echo ASCII::to_ascii('Düsseldorf', 'de'); // will output // Duesseldorf echo ASCII::to_ascii('Düsseldorf', 'en'); // will output // Dusseldorf ``` -------------------------------- ### Transliteration Example: Portable ASCII vs. Stringy Source: https://github.com/voku/portable-ascii/blob/master/build/docs/base.md Demonstrates the usage of the `to_transliterate` method in Portable ASCII compared to the `toTransliterate` method in the voku/Stringy library for converting special characters to their closest ASCII equivalents. ```php // Portable ASCII use voku\helper\ASCII; ASCII::to_transliterate('déjà σσς iıii'); // 'deja sss iiii' // voku/Stringy use Stringy\Stringy as S; $stringy = S::create('déjà σσς iıii'); $stringy->toTransliterate(); // 'deja sss iiii' ``` -------------------------------- ### ASCII Conversion Example Source: https://github.com/voku/portable-ascii/blob/master/README.md Shows how to use the `ASCII::to_ascii()` method to convert strings containing special characters (like umlauts) to their ASCII representation. The method accepts an optional locale parameter to influence the conversion. ```php