/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/reflection/tests/bug76737.phpt
28 строк
692 B
Joe Watkins
Not serializable flag permeation
20 июл 2021, 13:28
Не верифицирован
20 июл 2021, 13:28
570d9b6
Код
Авторство
О чём код?
--TEST-- Bug #76737: Unserialized reflection objects are broken, they shouldn't be serializable --FILE-- <?php try { $r = new ReflectionClass('stdClass'); var_dump(serialize($r)); } catch (Exception $e) { echo $e->getMessage(), "\n"; } try { $s = 'C:15:"ReflectionClass":0:{}'; var_dump(unserialize($s)); } catch (Exception $e) { echo $e->getMessage(), "\n"; } try { $s = 'O:15:"ReflectionClass":0:{}'; var_dump(unserialize($s)); } catch (Exception $e) { echo $e->getMessage(), "\n"; } ?> --EXPECTF-- Serialization of 'ReflectionClass' is not allowed Unserialization of 'ReflectionClass' is not allowed Unserialization of 'ReflectionClass' is not allowed