mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Add new test (bug reported in internals list by Robin)
This commit is contained in:
parent
9f959c2630
commit
7720de7339
19
Zend/tests/access_modifiers_008.phpt
Normal file
19
Zend/tests/access_modifiers_008.phpt
Normal file
@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Inconsistencies when accessing protected members
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A {
|
||||
static protected function f() {return 'A::f()';}
|
||||
}
|
||||
class B1 extends A {
|
||||
static protected function f() {return 'B1::f()';}
|
||||
}
|
||||
class B2 extends A {
|
||||
static public function test() {echo B1::f();}
|
||||
}
|
||||
B2::test();
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Call to protected method B1::f() from context 'B2' in %s on line %d
|
Loading…
Reference in New Issue
Block a user