xref: /PHP-8.1/Zend/tests/bug33277.phpt (revision 782352c5)
1--TEST--
2Bug #33277 (private method accessed by child class)
3--FILE--
4<?php
5class foo {
6        private function bar() {
7                echo "private!\n";
8        }
9}
10
11class fooson extends foo {
12        function barson() {
13                $this->bar();
14        }
15}
16
17class foo2son extends fooson {
18
19        function bar() {
20                echo "public!\n";
21        }
22}
23
24$b = new foo2son();
25$b->barson();
26?>
27--EXPECT--
28public!
29