mirror of
https://github.com/php/php-src.git
synced 2024-12-19 15:00:15 +08:00
21 lines
366 B
PHP
21 lines
366 B
PHP
--TEST--
|
|
Bug #62814: It is possible to stiffen child class members visibility
|
|
--FILE--
|
|
<?php
|
|
|
|
class A {
|
|
private function test() { }
|
|
}
|
|
|
|
class B extends A {
|
|
protected function test() { }
|
|
}
|
|
|
|
class C extends B {
|
|
private function test() { }
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Access level to C::test() must be protected (as in class B) or weaker in %s on line %d
|