summaryrefslogtreecommitdiff
path: root/Zend/tests/bug21888.phpt
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-06-01 18:35:29 +0000
committerMarcus Boerger <helly@php.net>2003-06-01 18:35:29 +0000
commitc3dd93fb4acd6ec42ae850228ddd7dc7e47535cc (patch)
tree7ea05da58e539de2813ad5941d413f9f7ad7cbb0 /Zend/tests/bug21888.phpt
parent070803a482e3da4c1b1cf86bbe056373b37556c0 (diff)
downloadphp-git-c3dd93fb4acd6ec42ae850228ddd7dc7e47535cc.tar.gz
Add some ZE2 bug tests
Diffstat (limited to 'Zend/tests/bug21888.phpt')
-rwxr-xr-xZend/tests/bug21888.phpt39
1 files changed, 39 insertions, 0 deletions
diff --git a/Zend/tests/bug21888.phpt b/Zend/tests/bug21888.phpt
new file mode 100755
index 0000000000..8485cbef18
--- /dev/null
+++ b/Zend/tests/bug21888.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Bug #21888 protected property and protected method of the same name
+--SKIPIF--
+<?php
+ if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 is needed');
+?>
+--FILE--
+<?php
+class mom {
+
+ protected $prot = "protected property\n";
+
+ protected function prot() {
+ print "protected method\n";
+ }
+}
+
+class child extends mom {
+
+ public function callMom() {
+ $this->prot();
+ }
+
+ public function viewMom() {
+ print $this->prot;
+ }
+
+}
+
+$c = new child();
+$c->callMom();
+$c->viewMom();
+?>
+--EXPECT--
+protected method
+protected property
+--EXPECT--
+protected method
+protected property