mirror of
https://github.com/php/php-src.git
synced 2024-12-02 06:13:40 +08:00
add test for bug #36337
This commit is contained in:
parent
7ab93bee97
commit
2c24249ccc
28
ext/reflection/tests/bug36337.phpt
Normal file
28
ext/reflection/tests/bug36337.phpt
Normal file
@ -0,0 +1,28 @@
|
||||
--TEST--
|
||||
Bug #36337 (ReflectionProperty fails to return correct visibility)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
abstract class enum {
|
||||
protected $_values;
|
||||
|
||||
public function __construct() {
|
||||
$property = new ReflectionProperty(get_class($this),'_values');
|
||||
var_dump($property->isProtected());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
final class myEnum extends enum {
|
||||
public $_values = array(
|
||||
0 => 'No value',
|
||||
);
|
||||
}
|
||||
|
||||
$x = new myEnum();
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
Done
|
Loading…
Reference in New Issue
Block a user