xref: /PHP-8.0/tests/classes/class_final.phpt (revision f8d79582)
1--TEST--
2ZE2 A final class cannot be inherited
3--FILE--
4<?php
5
6final class base {
7    function show() {
8        echo "base\n";
9    }
10}
11
12$t = new base();
13
14class derived extends base {
15}
16
17echo "Done\n"; // shouldn't be displayed
18?>
19--EXPECTF--
20Fatal error: Class derived may not inherit from final class (base) in %s on line %d
21