/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/json/tests/bug73113.phpt
23 строки
478 B
Máté Kocsis
Declare tentative return types for ext/json (#7051)
27 май 2021, 11:47
Не верифицирован
27 май 2021, 11:47
5beba0b
Код
Авторство
О чём код?
--TEST-- Bug #73113 (Segfault with throwing JsonSerializable) Also test that the custom exception is not wrapped by ext/json --FILE-- <?php class JsonSerializableObject implements \JsonSerializable { public function jsonSerialize(): mixed { throw new \Exception('This error is expected'); } } $obj = new JsonSerializableObject(); try { echo json_encode($obj); } catch (\Exception $e) { echo $e->getMessage(); } ?> --EXPECT-- This error is expected