webpatser / fledge-portable-ascii
PHP 8.5 optimized portable-ascii for Fledge — max performance with ext-mbstring.
Package info
github.com/webpatser/fledge-portable-ascii
pkg:composer/webpatser/fledge-portable-ascii
Requires
- php: ^8.5
- ext-mbstring: *
Requires (Dev)
- pestphp/pest: ^3.0 || ^4.0
Suggests
- ext-intl: For fastest transliteration via ICU (strict mode)
Replaces
- voku/portable-ascii: 2.0.99
- webpatser/portable-ascii: 3.99.0
This package is auto-updated.
Last update: 2026-04-09 10:59:23 UTC
README
PHP 8.5 optimized drop-in replacement for voku/portable-ascii — built for Fledge.
Why a separate package?
The base webpatser/portable-ascii supports PHP 8.1+ and conditionally detects extensions at runtime. This variant requires PHP 8.5 and ext-mbstring, removing all conditionals for maximum performance:
- No runtime capability detection — mbstring is always available
mb_str_split()directly (nopreg_match_allfallback)mb_convert_encoding()for UTF-8 cleaning (no regex fallback)- All PHP 8.5 features enabled unconditionally
Installation
composer require webpatser/fledge-portable-ascii
Replaces both voku/portable-ascii and webpatser/portable-ascii via Composer's replace directive.
Requirements
- PHP 8.5+
- ext-mbstring (required, not optional)
- ext-intl (optional — used in strict transliteration mode)
Usage
Same API as voku/portable-ascii:
use voku\helper\ASCII; ASCII::to_ascii('Düsseldorf', 'de'); // 'Duesseldorf' ASCII::to_slugify('Hello Wörld!'); // 'hello-woerld' ASCII::to_transliterate('こんにちは'); // 'konnichiha' ASCII::is_ascii('hello'); // true
Credits
Based on webpatser/portable-ascii, which is a modernized fork of voku/portable-ascii by Lars Moelleken.
License
MIT