File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
Zend /
tests /
bug22725.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:47:52 2012 UTC (13 years, 10 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
1: --TEST--
2: Bug #22725 (A derived class can call a parent's protected method that calls a private method)
3: --SKIPIF--
4: <?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
5: --FILE--
6: <?php
7: class Foo {
8: private function aPrivateMethod() {
9: echo "Foo::aPrivateMethod() called.\n";
10: }
11:
12: protected function aProtectedMethod() {
13: echo "Foo::aProtectedMethod() called.\n";
14: $this->aPrivateMethod();
15: }
16: }
17:
18: class Bar extends Foo {
19: public function aPublicMethod() {
20: echo "Bar::aPublicMethod() called.\n";
21: $this->aProtectedMethod();
22: }
23: }
24:
25: $o = new Bar;
26: $o->aPublicMethod();
27: ?>
28: --EXPECT--
29: Bar::aPublicMethod() called.
30: Foo::aProtectedMethod() called.
31: Foo::aPrivateMethod() called.
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>