summaryrefslogtreecommitdiff
path: root/Zend/tests/traits/error_014.phpt
blob: be1c91977c1b216b694721b68b9fe4fdbaaa57a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--TEST--
Trying to override final method
--FILE--
<?php

trait foo {
	public function test() { return 3; }
}

class baz {
	final public function test() { return 4; }
}

class bar extends baz {
	use foo { test as public; }
}

$x = new bar;
var_dump($x->test());

?>
--EXPECTF--
Fatal error: Cannot override final method baz::test() in %s on line %d