xref: /PHP-5.6/tests/classes/private_007b.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 function pub() {
10		$this->priv();
11	}
12	private function priv()	{
13		echo "Bar::priv()\n";
14	}
15}
16class Foo extends Bar {
17	public function priv()	{
18		echo "Foo::priv()\n";
19	}
20}
21
22$obj = new Foo();
23$obj->pub();
24$obj->priv();
25
26echo "Done\n";
27?>
28--EXPECTF--
29Bar::priv()
30Foo::priv()
31Done
32