summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2010-03-07 00:57:19 (GMT)
committerFelipe Pena <felipe@php.net>2010-03-07 00:57:19 (GMT)
commit4149bb3dfd9c4fa67164099959feb8b819ae81da (patch)
treeb4bfee09c17806b5cde59e938fa354a25d78fa50 /Zend
parentea1447c3ce5f6f6895143aa93e2b0c7dfa3e5618 (diff)
downloadphp-4149bb3dfd9c4fa67164099959feb8b819ae81da.tar.gz
- New test
Diffstat (limited to 'Zend')
-rw-r--r--Zend/tests/bug50810.phpt46
1 files changed, 46 insertions, 0 deletions
diff --git a/Zend/tests/bug50810.phpt b/Zend/tests/bug50810.phpt
new file mode 100644
index 0000000..8b4d719
--- /dev/null
+++ b/Zend/tests/bug50810.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Bug #50810 (property_exists does not work for private)
+--FILE--
+<?php
+
+class ExampleSuperClass
+{
+ private $foo;
+ static protected $bar;
+
+ private function foo()
+ {
+ }
+
+ public function propertyFooExists()
+ {
+ return property_exists($this, 'foo');
+ }
+
+}
+
+class ExampleSubClass extends ExampleSuperClass
+{
+ public function methodExists()
+ {
+ return method_exists($this, 'foo');
+ }
+
+ public function propertyBarExists()
+ {
+ return property_exists($this, 'bar');
+ }
+}
+
+$example = new ExampleSubClass();
+var_dump($example->methodExists());
+var_dump(method_exists($example, 'propertyFooExists'));
+var_dump($example->propertyFooExists());
+var_dump($example->propertyBarExists());
+
+?>
+--EXPECT--
+bool(true)
+bool(true)
+bool(true)
+bool(true)