xref: /PHP-7.1/ext/reflection/tests/bug36337.phpt (revision 7af945e2)
1--TEST--
2Reflection Bug #36337 (ReflectionProperty fails to return correct visibility)
3--FILE--
4<?php
5
6abstract class enum {
7    protected $_values;
8
9    public function __construct() {
10        $property = new ReflectionProperty(get_class($this),'_values');
11        var_dump($property->isProtected());
12    }
13
14}
15
16final class myEnum extends enum {
17    public $_values = array(
18           0 => 'No value',
19       );
20}
21
22$x = new myEnum();
23
24echo "Done\n";
25?>
26--EXPECT--
27bool(false)
28Done
29