PHP code example of spomky-labs / php-punycode
1. Go to this page and download the library: Download spomky-labs/php-punycode library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
spomky-labs / php-punycode example snippets
// 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
sh
composer