1--TEST--
2ZE2 A redeclared method must have the same or higher visibility
3--FILE--
4<?php
5
6class father {
7	function f0() {}
8	function f1() {}
9	public function f2() {}
10	protected function f3() {}
11	private function f4() {}
12}
13
14class same extends father {
15
16	// overload fn with same visibility
17	function f0() {}
18	public function f1() {}
19	public function f2() {}
20	protected function f3() {}
21	private function f4() {}
22}
23
24class fail extends same {
25	protected function f2() {}
26}
27
28echo "Done\n"; // shouldn't be displayed
29?>
30--EXPECTF--
31Fatal error: Access level to fail::f2() must be public (as in class same) in %s on line 22
32