diff options
author | Marcus Boerger <helly@php.net> | 2003-06-01 18:35:29 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2003-06-01 18:35:29 +0000 |
commit | c3dd93fb4acd6ec42ae850228ddd7dc7e47535cc (patch) | |
tree | 7ea05da58e539de2813ad5941d413f9f7ad7cbb0 /Zend/tests/bug21888.phpt | |
parent | 070803a482e3da4c1b1cf86bbe056373b37556c0 (diff) | |
download | php-git-c3dd93fb4acd6ec42ae850228ddd7dc7e47535cc.tar.gz |
Add some ZE2 bug tests
Diffstat (limited to 'Zend/tests/bug21888.phpt')
-rwxr-xr-x | Zend/tests/bug21888.phpt | 39 |
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 |