xref: /PHP-7.2/tests/classes/final.phpt (revision a8d901a8)
1--TEST--
2ZE2 A method may be redeclared final
3--FILE--
4<?php
5
6class first {
7	function show() {
8		echo "Call to function first::show()\n";
9	}
10}
11
12$t = new first();
13$t->show();
14
15class second extends first {
16	final function show() {
17		echo "Call to function second::show()\n";
18	}
19}
20
21$t2 = new second();
22$t2->show();
23
24echo "Done\n";
25?>
26--EXPECTF--
27Call to function first::show()
28Call to function second::show()
29Done
30