summaryrefslogtreecommitdiff
path: root/Zend/tests/access_modifiers_010.phpt
blob: 637ea36ce95b4c2c8daf85ea5bd8dc3b5dce43ab (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
28
29
30
31
--TEST--
Testing visibility of methods
--FILE--
<?php

class d {
	private function test2() {
		print "Bar\n";
	}
}

abstract class a extends d {
	public function test() {
		$this->test2();
	}
}

abstract class b extends a {
}

class c extends b {
	public function __construct() {
		$this->test();
	}	
}

new c;

?>
--EXPECTF--
Fatal error: Call to private method d::test2() from context 'a' in %s on line %d