xref: /PHP-7.2/Zend/tests/bug61362.phpt (revision 653c8693)
1--TEST--
2Bug #61362 (Exception::getTraceAsString, Exception::__toString not able to handle unicode)
3--FILE--
4<?php
5function test($arg){
6	throw new Exception();
7}
8
9try {
10	test('тест');
11}
12catch(Exception $e) {
13	echo $e->getTraceAsString(), "\n";
14	echo (string)$e;
15}
16?>
17--EXPECTF--
18#0 %s(%d): test('\xD1\x82\xD0\xB5\xD1\x81\xD1\x82')
19#1 {main}
20Exception in %s:%d
21Stack trace:
22#0 %s(%d): test('\xD1\x82\xD0\xB5\xD1\x81\xD1\x82')
23#1 {main}
24