[php-src] master: Merge branch 'PHP-8.5'

Gina Peter Banyard <[email protected]>
Newsgroups gmane.comp.php.cvs.general
Message-ID <[email protected]>
Author: Gina Peter Banyard (Girgias)
Date: 2026-07-08T18:38:17+01:00

Commit: https://github.com/php/php-src/commit/d4f4f4f88cf5c1515e47e08c67371d3cc49bfa5d
Raw diff: https://github.com/php/php-src/commit/d4f4f4f88cf5c1515e47e08c67371d3cc49bfa5d.diff

Merge branch 'PHP-8.5'

* PHP-8.5:
  ext/iconv/tests/iconv_mime_encode.phpt: skip for "unknown" iconv
  ext/iconv/tests/eucjp2iso2022jp.phpt: skip for "unknown" iconv

Changed paths:
  M  ext/iconv/tests/eucjp2iso2022jp.phpt
  M  ext/iconv/tests/iconv_mime_encode.phpt


Diff:

diff --git a/ext/iconv/tests/eucjp2iso2022jp.phpt b/ext/iconv/tests/eucjp2iso2022jp.phpt
index 490e772c80c2..db48ea627140 100644
--- a/ext/iconv/tests/eucjp2iso2022jp.phpt
+++ b/ext/iconv/tests/eucjp2iso2022jp.phpt
@@ -7,6 +7,13 @@ iconv
 if (PHP_OS_FAMILY === 'Solaris') {
     die("skip Solaris iconv behaves differently");
 }
+// ISO-2022-JP is a stateful encoding, so the right answer is not
+// unique. In particular, musl (type "unknown") is known to have an
+// inefficient encoding for it that does not agree with the expected
+// output below.
+if (ICONV_IMPL == "unknown") {
+    die("skip byte-comparison of stateful encoding with unknown iconv");
+}
 ?>
 --INI--
 error_reporting=2039
@@ -22,8 +29,8 @@ function hexdump($str) {
     print "\n";
 }
 
-$str = str_repeat("ÆüËÜ¸ì¥Æ¥­¥¹¥È¤È English text", 30);
-$str .= "ÆüËܸì";
+$str = str_repeat("���ܸ�ƥ����Ȥ� English text", 30);
+$str .= "���ܸ�";
 
 echo hexdump(iconv("EUC-JP", "ISO-2022-JP", $str));
 ?>
diff --git a/ext/iconv/tests/iconv_mime_encode.phpt b/ext/iconv/tests/iconv_mime_encode.phpt
index 9cf906a73e61..7f4b9bfb5608 100644
--- a/ext/iconv/tests/iconv_mime_encode.phpt
+++ b/ext/iconv/tests/iconv_mime_encode.phpt
@@ -2,6 +2,16 @@
 iconv_mime_encode()
 --EXTENSIONS--
 iconv
+--SKIPIF--
+<?php
+// ISO-2022-JP is a stateful encoding, so the right answer is not
+// unique. In particular, musl (type "unknown") is known to have an
+// inefficient encoding for it that does not agree with the expected
+// output below.
+if (ICONV_IMPL == "unknown") {
+    die("skip byte-comparison of stateful encoding with unknown iconv");
+}
+?>
 --INI--
 iconv.internal_charset=iso-8859-1
 --SKIPIF--
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.