bug36337.phpt 484 B

12345678910111213141516171819202122232425262728
  1. --TEST--
  2. Reflection Bug #36337 (ReflectionProperty fails to return correct visibility)
  3. --FILE--
  4. <?php
  5. abstract class enum_ {
  6. protected $_values;
  7. public function __construct() {
  8. $property = new ReflectionProperty(get_class($this),'_values');
  9. var_dump($property->isProtected());
  10. }
  11. }
  12. final class myEnum extends enum_ {
  13. public $_values = array(
  14. 0 => 'No value',
  15. );
  16. }
  17. $x = new myEnum();
  18. echo "Done\n";
  19. ?>
  20. --EXPECT--
  21. bool(false)
  22. Done