summaryrefslogtreecommitdiff
path: root/tests/lang/036.phpt
blob: 474316e363a79b9d8b31f5a05439f4bbb59a4039 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--TEST--
Child public element should not override parent private element in parent methods
--FILE--
<?php
class par {
	private $id = "foo";

	function displayMe()
	{
		print $this->id;
	}
};

class chld extends par {
	public $id = "bar";
	function displayHim()
	{
		parent::displayMe();
	}
};


$obj = new chld();
$obj->displayHim();
?>
--EXPECT--
foo