xref: /PHP-7.2/tests/classes/static_mix_2.phpt (revision a8d901a8)
1--TEST--
2ZE2 You cannot overload a non static method with a static method
3--FILE--
4<?php
5
6class pass {
7	function show() {
8		echo "Call to function pass::show()\n";
9	}
10}
11
12class fail extends pass {
13	static function show() {
14		echo "Call to function fail::show()\n";
15	}
16}
17
18$t = new pass();
19$t->show();
20fail::show();
21
22echo "Done\n"; // shouldn't be displayed
23?>
24--EXPECTF--
25Fatal error: Cannot make non static method pass::show() static in class fail in %s on line %d
26