ru_php/ext/reflection/tests/bug37816.phpt

20 lines
270 B
PHP

--TEST--
Bug #37816 (ReflectionProperty does not throw exception when accessing protected attribute)
--FILE--
<?php
class TestClass
{
protected $p = 2;
}
$o = new TestClass;
$r = new ReflectionProperty($o, 'p');
var_dump($r->getValue($o));
?>
--EXPECT--
int(2)