{
size_t i;
+ for (i = 0; i < impl->func->args->count; ++i ) {
+ impl_arg *iarg = impl->func->args->args[i];
+
+ switch (iarg->type->type) {
+ case PSI_T_STRING:
+ if (iarg->val.str) {
+ zend_string_release(iarg->val.str);
+ }
+ break;
+ }
+ }
+
for (i = 0; i < impl->decl->args->count; ++i) {
decl_arg *darg = impl->decl->args->args[i];
--- /dev/null
+--TEST--
+libidn
+--INI--
+psi.directory={PWD}
+--SKIPIF--
+<?php
+extension_loaded("psi") or die("skip - need ext/psi");
+?>
+--FILE--
+===TEST===
+<?php
+
+$result = "buecher.de";
+$rc = idn\utf8_to_ascii("bücher.de", $result, IDNA_USE_STD3_ASCII_RULES);
+printf("%s\n", $result);
+printf("%s\n", idn\strerror($rc));
+
+?>
+===DONE===
+--EXPECT--
+===TEST===
+xn--bcher-kva.de
+Success
+===DONE===
\ No newline at end of file
--- /dev/null
+--TEST--
+libidn
+--INI--
+psi.directory={PWD}
+--SKIPIF--
+<?php
+extension_loaded("psi") or die("skip - need ext/psi");
+?>
+--FILE--
+===TEST===
+<?php
+
+$result = "buecher.de";
+$rc = idn\utf8_to_ascii("bücher.de", $result, IDNA_USE_STD3_ASCII_RULES);
+printf("%s\n", $result);
+printf("%s\n", idn\strerror($rc));
+
+$rc = idn\utf8_to_ascii("bücher2.de", $result, IDNA_USE_STD3_ASCII_RULES);
+printf("%s\n", $result);
+printf("%s\n", idn\strerror($rc));
+
+?>
+===DONE===
+--EXPECT--
+===TEST===
+xn--bcher-kva.de
+Success
+xn--bcher2-3ya.de
+Success
+===DONE===
\ No newline at end of file