idn_conversion

Summary

Internationalized Domain Name (IDN) support (enabled by default if intl extension is available).

Types

  • bool
  • int

Default

true if intl extension is available (and ICU library is 4.6+ for PHP 7.2+), false otherwise

Constant

GuzzleHttp\RequestOptions::IDN_CONVERSION

  1. $client->request('GET', 'https://яндекс.рф');
  2. // яндекс.рф is translated to xn--d1acpjx3f.xn--p1ai before passing it to the handler
  3. $res = $client->request('GET', 'https://яндекс.рф', ['idn_conversion' => false]);
  4. // The domain part (яндекс.рф) stays unmodified

Enables/disables IDN support, can also be used for precise control by combining IDNA_* constants (except IDNA_ERROR_*), see $options parameter in idn_to_ascii() documentation for more details.