PHPackages                             horde/stringprep - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. horde/stringprep

ActiveLibrary[Localization &amp; i18n](/categories/localization)

horde/stringprep
================

Internationalized strings preparation library

v2.0.0(1mo ago)114032LGPL-3.0-onlyPHPPHP ^8.1

Since Sep 19Pushed 1mo ago7 watchersCompare

[ Source](https://github.com/horde/Stringprep)[ Packagist](https://packagist.org/packages/horde/stringprep)[ Docs](https://www.horde.org)[ RSS](/packages/horde-stringprep/feed)WikiDiscussions FRAMEWORK\_6\_0 Synced 2w ago

READMEChangelog (2)DependenciesVersions (15)Used By (2)

Horde Stringprep
================

[](#horde-stringprep)

Unicode string preparation for authentication and protocol identifiers. Provides both legacy **RFC 3454 Stringprep** and modern **RFC 7564 PRECIS**profiles, backed by PHP's `ext-intl` with no bundled vendor dependencies.

Requires PHP 8.1+ and `ext-intl`.

Stringprep profiles (RFC 3454)
------------------------------

[](#stringprep-profiles-rfc-3454)

Frozen to Unicode 3.2. Used by older protocol specifications.

ProfileClassRFCPurposeSASLprep`SaslPrepProfile`4013SASL usernames and passwordsNameprep`NameprepProfile`3491Internationalized domain namesiSCSI`IscsiProfile`3722iSCSI namingNodeprep`NodeprepProfile`6122 App AXMPP node identifiersResourceprep`ResourceprepProfile`6122 App BXMPP resource identifiersPolicyMIB`PolicyMibProfile`4011Policy-based managementTrace`TraceProfile`4505Anonymous SASLPRECIS profiles (RFC 7564)
--------------------------

[](#precis-profiles-rfc-7564)

Unicode-version-agile. Recommended for new implementations.

ProfileClassRFCPurposeUsernameCaseMapped`UsernameCaseMappedProfile`8265Usernames (case-insensitive)UsernameCasePreserved`UsernameCasePreservedProfile`8265Usernames (case-sensitive)OpaqueString`OpaqueStringProfile`8265PasswordsNickname`NicknameProfile`8266Chat/display nicknamesUsage
-----

[](#usage)

All profiles implement `ProfileInterface` with the same `apply()` method:

```
use Horde\Stringprep\SaslPrepProfile;
use Horde\Stringprep\OpaqueStringProfile;
use Horde\Stringprep\ProfileInterface;

// Legacy stringprep
$saslprep = new SaslPrepProfile();
$username = $saslprep->apply($input, ProfileInterface::MODE_QUERY);

// Modern PRECIS
$opaque = new OpaqueStringProfile();
$password = $opaque->apply($input, ProfileInterface::MODE_STORE);
```

`MODE_STORE` (default) rejects unassigned codepoints. `MODE_QUERY` allows them.

See [doc/UPGRADING.md](doc/UPGRADING.md) for migration from the bundled `lib/` Znerol implementation.

###  Health Score

55

—

FairBetter than 97% of packages

Maintenance90

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community24

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~356 days

Recently: every ~323 days

Total

10

Last Release

51d ago

Major Versions

1.0.4 → 2.0.0alpha12021-02-24

v1.2.1 → v2.0.0alpha42025-06-05

PHP version history (4 changes)1.0.4PHP ^5.3 || ^7

2.0.0alpha1PHP ^7

v1.1.0PHP ^7.4 || ^8.0

v2.0.0alpha4PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/e4f6c6771993db2ed500959b42353f6cf6a2ca0406d9617f7ae680f4504faa4a?d=identicon)[horde](/maintainers/horde)

![](https://www.gravatar.com/avatar/816e2b926f25f8cd2939054c7a7173011b4303d690e25ab61bf33cf8c7cf71ae?d=identicon)[tdannhauer](/maintainers/tdannhauer)

---

Top Contributors

[![yunosh](https://avatars.githubusercontent.com/u/379318?v=4)](https://github.com/yunosh "yunosh (34 commits)")[![ralflang](https://avatars.githubusercontent.com/u/646976?v=4)](https://github.com/ralflang "ralflang (21 commits)")[![slusarz](https://avatars.githubusercontent.com/u/381003?v=4)](https://github.com/slusarz "slusarz (11 commits)")[![mrubinsk](https://avatars.githubusercontent.com/u/66822?v=4)](https://github.com/mrubinsk "mrubinsk (3 commits)")[![renan](https://avatars.githubusercontent.com/u/28046?v=4)](https://github.com/renan "renan (1 commits)")

---

Tags

precisstringpreprfc7564rfc3454

### Embed Badge

![Health badge](/badges/horde-stringprep/health.svg)

```
[![Health](https://phpackages.com/badges/horde-stringprep/health.svg)](https://phpackages.com/packages/horde-stringprep)
```

###  Alternatives

[smarty-gettext/smarty-gettext

Gettext plugin enabling internationalization in Smarty Package files

752.5M8](/packages/smarty-gettext-smarty-gettext)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
