Your IP : 216.73.216.48


Current Path : /hdd/hdd12/install/php/php-7.4.32/tests/classes/
Upload File :
Current File : //hdd/hdd12/install/php/php-7.4.32/tests/classes/visibility_004b.phpt

--TEST--
ZE2 A redeclared method must have the same or higher visibility
--FILE--
<?php

class father {
	function f0() {}
	function f1() {}
	public function f2() {}
	protected function f3() {}
	private function f4() {}
}

class same extends father {

	// overload fn with same visibility
	function f0() {}
	public function f1() {}
	public function f2() {}
	protected function f3() {}
	private function f4() {}
}

class fail extends same {
	protected function f4() {}
}

echo "Done\n"; // shouldn't be displayed
?>
--EXPECT--
Done