summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/bug36337.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/reflection/tests/bug36337.phpt')
-rw-r--r--ext/reflection/tests/bug36337.phpt30
1 files changed, 30 insertions, 0 deletions
diff --git a/ext/reflection/tests/bug36337.phpt b/ext/reflection/tests/bug36337.phpt
new file mode 100644
index 0000000000..8ec928fc89
--- /dev/null
+++ b/ext/reflection/tests/bug36337.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Reflection Bug #36337 (ReflectionProperty fails to return correct visibility)
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--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