1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 16:52:18 +01:00
Files
archived-php-src/ext/mbstring/tests/bug78609.phpt
Christoph M. Becker 45db6fa567 Fix #78609: mb_check_encoding() no longer supports stringable objects
We apply type juggling for other types than array.
2019-09-30 12:42:04 +02:00

21 lines
368 B
PHP

--TEST--
Bug #78609 (mb_check_encoding() no longer supports stringable objects)
--SKIPIF--
<?php
if (!extension_loaded('mbstring')) die('skip mbstring extension not available');
?>
--FILE--
<?php
class Foo
{
public function __toString()
{
return 'string_representation';
}
}
var_dump(mb_check_encoding(new Foo, 'UTF-8'));
?>
--EXPECT--
bool(true)