{"id":1146,"date":"2022-08-22T17:33:07","date_gmt":"2022-08-22T16:33:07","guid":{"rendered":"https:\/\/editjournal.redakt.eu\/faxmodem\/?p=1146"},"modified":"2022-08-22T17:33:07","modified_gmt":"2022-08-22T16:33:07","slug":"whats-up-with-php-unknown-intl_idna_variant_2003-is-deprecated","status":"publish","type":"post","link":"https:\/\/editjournal.redakt.eu\/faxmodem\/blog\/development\/whats-up-with-php-unknown-intl_idna_variant_2003-is-deprecated\/","title":{"rendered":"What&#8217;s up with &#8220;PHP Unknown: INTL_IDNA_VARIANT_2003 is deprecated&#8221;?"},"content":{"rendered":"<p>Here's how the error may look like:<\/p>\n<blockquote>\n<p>PHP Unknown:  idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated<\/p>\n<p>PHP Unknown:  idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated<\/p>\n<\/blockquote>\n<p><em>The cause<\/em> is the <code>2003<\/code> version got deprecated and you're supposed to be using <code>UTS46<\/code>. Most likely though, you were today years old when you first learned about these. PHP is picking one by default, and until 7.3 this worked fine. In 7.3 however, it defaults to the deprecated <code>2003<\/code> standard, and the worst thing is <a href=\"https:\/\/bugs.php.net\/bug.php?id=75609\">it does that on purpose<\/a> (yeah), and there doesn't seem to be a way to at least set the new one as default.<\/p>\n<p><em>The workaround<\/em> is to explicitly use the new <code>INTL_IDNA_VARIANT_UTS46<\/code> everywhere you call <code>idn_to_*()<\/code>:<\/p>\n<pre><code>idn_to_utf8($string, 0, INTL_IDNA_VARIANT_UTS46)<\/code><\/pre>\n<p>If you call them a lot, it's going to be an unnecessary burden.<\/p>\n<p><em>The solution<\/em> is to upgrade to 7.4<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s how the error may look like: PHP Unknown: idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated PHP Unknown: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated The cause is the 2003 version got deprecated and you&#8217;re supposed to be using UTS46. Most likely though, you were today years old when you first learned about these. PHP is picking one by default, and&hellip; <a class=\"more-link\" href=\"https:\/\/editjournal.redakt.eu\/faxmodem\/blog\/development\/whats-up-with-php-unknown-intl_idna_variant_2003-is-deprecated\/\">Continue reading <span class=\"screen-reader-text\">What&#8217;s up with &#8220;PHP Unknown: INTL_IDNA_VARIANT_2003 is deprecated&#8221;?<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[706],"tags":[916],"class_list":["post-1146","post","type-post","status-publish","format-standard","hentry","category-development","tag-php","entry"],"_links":{"self":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts\/1146","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/comments?post=1146"}],"version-history":[{"count":1,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts\/1146\/revisions"}],"predecessor-version":[{"id":1150,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts\/1146\/revisions\/1150"}],"wp:attachment":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/media?parent=1146"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/categories?post=1146"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/tags?post=1146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}