We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4327b11 + ab84617 commit da9c206Copy full SHA for da9c206
ext/mbstring/tests/bug79154.phpt
@@ -0,0 +1,34 @@
1
+--TEST--
2
+Bug 79154 (mb_convert_encoding() can modify $from_encoding)
3
+--SKIPIF--
4
+<?php
5
+if (!extension_loaded('mbstring')) die('mbstring extension not available');
6
+?>
7
+--FILE--
8
9
+class Utf8Encoding
10
+{
11
+ public function __toString()
12
+ {
13
+ return 'UTF-8';
14
+ }
15
+}
16
+
17
+$utf8encoding = new Utf8Encoding();
18
+$encodings = [$utf8encoding];
19
+var_dump($encodings);
20
+mb_convert_encoding('foo', 'UTF-8', $encodings);
21
22
23
24
+--EXPECTF--
25
+array(1) {
26
+ [0]=>
27
+ object(Utf8Encoding)#%d (0) {
28
29
30
31
32
33
34
0 commit comments