idna_convert::encode_uri
Removes a weakness of encode(), which cannot properly handle URIs but instead encodes their path or query components, too.
Signature
public function encode_uri(string
$uriĀ )
Parameters
-
$uri
- Expects the URI as a UTF-8 (or ASCII) string
Returns
- string
- The URI encoded to Punycode, everything but the host component is left alone