]> granicus.if.org Git - php/commitdiff
Add new test (bug reported in internals list by Robin)
authorFelipe Pena <felipe@php.net>
Tue, 11 Mar 2008 16:48:14 +0000 (16:48 +0000)
committerFelipe Pena <felipe@php.net>
Tue, 11 Mar 2008 16:48:14 +0000 (16:48 +0000)
Zend/tests/access_modifiers_008.phpt [new file with mode: 0644]

diff --git a/Zend/tests/access_modifiers_008.phpt b/Zend/tests/access_modifiers_008.phpt
new file mode 100644 (file)
index 0000000..47d428b
--- /dev/null
@@ -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