xref: /PHP-8.4/Zend/tests/traits/language019.phpt (revision 79d024ac)
1--TEST--
2final alias
3--FILE--
4<?php
5trait T1 {
6    function foo() {}
7}
8class C1 {
9    use T1 {
10        T1::foo as final;
11    }
12}
13class C2 extends C1 {
14    public function foo() {}
15}
16?>
17--EXPECTF--
18Fatal error: Cannot override final method C1::foo() in %s on line %d
19