diff --git a/Zend/tests/grandparent_prototype.phpt b/Zend/tests/grandparent_prototype.phpt new file mode 100644 index 00000000000..872969654de --- /dev/null +++ b/Zend/tests/grandparent_prototype.phpt @@ -0,0 +1,26 @@ +--TEST-- +Protected visibility test case with a grandparent prototype +--FILE-- +test(); // Uncaught Error: Call to protected method D::test() from context 'B' + } +} +class C extends A { + protected function test() {} +} +class D extends C { + protected function test() { + echo "Hello World!\n"; + } +} +(new B)->test2(new D); + +?> +--EXPECT-- +Hello World!