mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
269c8dac1d
RFC: https://wiki.php.net/rfc/enumerations Co-authored-by: Nikita Popov <nikita.ppv@gmail.com> Closes GH-6489.
29 lines
484 B
PHP
29 lines
484 B
PHP
--TEST--
|
|
Reflection 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
|