mirror of
https://github.com/php/php-src.git
synced 2024-12-19 06:50:17 +08:00
d1e5006c14
And also include explicit linenos in tests.
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 12
|