rowbot/punycode
rowbot/punycode is a pure PHP implementation of the Punycode algorithm (RFC 3492) for encoding and decoding internationalized domain names. It offers a simple API with strict error handling, making it easy to convert Unicode labels to ASCII and back again.
münchen.de into xn--mnchen-3ya.de for DNS and storage.ext-intl requirement — shared hosting, constrained containers, or a policy of minimal native extensions.idn_to_ascii() output can vary with the linked ICU version.Net_IDNA2, true/punycode) or copyleft-adjacent alternatives, and you accept a young, low-adoption dependency in exchange.idn_to_ascii()/idn_to_utf8() — use ext-intl or symfony/polyfill-intl-idn; that is one line versus an integration.league/uri, symfony/http-foundation, or egulias/email-validator already encapsulate this; depending on a leaf codec directly duplicates that work.DomainEncoder interface, add RFC 3492 conformance vectors to CI, and have a fallback path to ext-intl.To executives: This is a small, MIT-licensed PHP component that lets us accept and route international domain names — a prerequisite for credible launches in markets where customers type native-script domains and expect them to work. It is cheap to integrate and carries no license cost. The tradeoff is maturity: it is a young, single-maintainer project with no visible downstream adoption, so we would treat it as an internal, swappable component rather than a strategic dependency. Recommendation: adopt behind an abstraction for a bounded IDN pilot, measure demand, and only then decide whether to invest in a full IDNA stack or switch to the native intl path.
To engineering: Single-purpose RFC 3492 codec, pure PHP, no ext-intl dependency. It does encoding/decoding only — it is not an IDNA validator. Pair it with a normalization/validation layer (or keep ext-intl as the default path) and add conformance test vectors plus homograph-mitigation rules for any user-facing display of Unicode domains. Budget a thin adapter so the dependency is replaceable in an afternoon.
How can I help you explore Laravel packages today?