/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/spl/tests/bug70959.phpt
25 строк
487 B
Máté Kocsis
Add many missing closing PHP tags to tests
09 авг 2020, 23:03
Не верифицирован
09 авг 2020, 23:03
7aacc70
Код
Авторство
О чём код?
--TEST-- Bug #70959 (ArrayObject unserialize does not restore protected fields) --FILE-- <?php class testObject extends ArrayObject { protected $test; public function getTest() { return $this->test; } public function setTest($test) { $this->test = $test; } } $obj = new testObject(); $obj->setTest('test'); var_dump($obj->getTest()); $obj2 = unserialize(serialize($obj)); var_dump($obj2->getTest()); ?> --EXPECT-- string(4) "test" string(4) "test"