/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/reflection/tests/bug75231.phpt
25 строк
485 B
Nikita Popov
Fixed bug #75231
02 июл 2018, 19:56
02 июл 2018, 19:56
c97b8bb
Код
Авторство
О чём код?
--TEST-- Bug #75231: ReflectionProperty#getValue() incorrectly works with inherited classes --FILE-- <?php class A { public $prop; public function __construct() { $this->prop = 'prop'; } public function method() { return 'method'; } } class B extends A { } print_r((new ReflectionMethod(B::class, 'method'))->invoke(new A()).PHP_EOL); print_r((new ReflectionProperty(B::class, 'prop'))->getValue(new A()).PHP_EOL); ?> --EXPECT-- method prop