webpatser/fledge-portable-ascii
Composer 安装命令:
composer require webpatser/fledge-portable-ascii
包简介
PHP 8.5 optimized portable-ascii for Fledge — max performance with ext-mbstring.
README 文档
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
统计信息
- 总下载量: 1.12k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-04-09