xref: /PHP-7.0/tests/classes/private_007.phpt (revision ffd6f29e)
1--TEST--
2ZE2 A derived class does not know about privates of ancestors
3--SKIPIF--
4<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
5--FILE--
6<?php
7
8class Bar {
9	public static function pub() {
10		Bar::priv();
11	}
12	private static function priv()	{
13		echo "Bar::priv()\n";
14	}
15}
16class Foo extends Bar {
17	public static function priv()	{
18		echo "Foo::priv()\n";
19	}
20}
21
22Foo::pub();
23Foo::priv();
24
25echo "Done\n";
26?>
27--EXPECTF--
28Bar::priv()
29Foo::priv()
30Done
31