xref: /PHP-7.2/ext/mbstring/tests/bug78609.phpt (revision 45db6fa5)
1--TEST--
2Bug #78609 (mb_check_encoding() no longer supports stringable objects)
3--SKIPIF--
4<?php
5if (!extension_loaded('mbstring')) die('skip mbstring extension not available');
6?>
7--FILE--
8<?php
9class Foo
10{
11    public function __toString()
12    {
13        return 'string_representation';
14    }
15}
16
17var_dump(mb_check_encoding(new Foo, 'UTF-8'));
18?>
19--EXPECT--
20bool(true)
21