spomky-labs/php-punycode

A Bootstring encoding of Unicode for Internationalized Domain Names in Applications (IDNA)

v3.0.1 2015-10-24 15:39 UTC

README

Build Status Scrutinizer Code Quality

Coverage Status

SensioLabsInsight

Latest Stable Version Total Downloads Latest Unstable Version License

A Bootstring encoding of Unicode for Internationalized Domain Names in Applications (IDNA).

Original code from https://github.com/true/php-punycode

The Release Process

The release process is described here.

Prerequisites

This library needs at least PHP 5.4+.

It has been successfully tested using PHP 5.4 to PHP 5.6, PHP 7 (7.0 and nightly) and HHVM.

Installation

The preferred way to install this library is to rely on Composer:

composer require "spomky-labs/php-punycode"

How to use

<?php

// Import Punycode
use SpomkyLabs\Punycode;

var_dump(Punycode::encode('renangonçalves.com'));
// outputs: xn--renangonalves-pgb.com

var_dump(Punycode::decode('xn--renangonalves-pgb.com'));
// outputs: renangonçalves.com

Contributing

Requests for new features, bug fixed and all other ideas to make this library useful are welcome. Please follow these best practices.

Licence

This library is release under MIT licence.