1
0
mirror of https://github.com/php/php-src.git synced 2026-03-28 10:12:18 +01:00

Add new test (bug reported in internals list by Robin)

This commit is contained in:
Felipe Pena
2008-03-11 16:56:06 +00:00
parent 7a9bfa9055
commit fec00fd374

View File

@@ -0,0 +1,24 @@
--TEST--
Inconsistencies when accessing protected members - 2
--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() {
var_dump(is_callable('B1::f'));
B1::f();
}
}
B2::test();
?>
--EXPECTF--
bool(false)
Fatal error: Call to protected method B1::f() from context 'B2' in %s on line %d