mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
33 lines
490 B
PHP
33 lines
490 B
PHP
--TEST--
|
|
Bug 79154 (mb_convert_encoding() can modify $from_encoding)
|
|
--EXTENSIONS--
|
|
mbstring
|
|
--FILE--
|
|
<?php
|
|
class Utf8Encoding
|
|
{
|
|
public function __toString()
|
|
{
|
|
return 'UTF-8';
|
|
}
|
|
}
|
|
|
|
$utf8encoding = new Utf8Encoding();
|
|
$encodings = [$utf8encoding];
|
|
var_dump($encodings);
|
|
mb_convert_encoding('foo', 'UTF-8', $encodings);
|
|
var_dump($encodings);
|
|
|
|
?>
|
|
--EXPECTF--
|
|
array(1) {
|
|
[0]=>
|
|
object(Utf8Encoding)#%d (0) {
|
|
}
|
|
}
|
|
array(1) {
|
|
[0]=>
|
|
object(Utf8Encoding)#%d (0) {
|
|
}
|
|
}
|