xref: /PHP-8.1/Zend/tests/bug62814.phpt (revision d1e5006c)
1--TEST--
2Bug #62814: It is possible to stiffen child class members visibility
3--FILE--
4<?php
5
6class A {
7    private function test() { }
8}
9
10class B extends A {
11    protected function test() { }
12}
13
14class C extends B {
15    private function test() { }
16}
17
18?>
19--EXPECTF--
20Fatal error: Access level to C::test() must be protected (as in class B) or weaker in %s on line 12
21