Annotation of embedaddon/php/Zend/tests/traits/error_001.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Trying to use instanceof for a method twice
3: --FILE--
4: <?php
5:
6: trait foo {
7: public function foo() {
8: return 1;
9: }
10: }
11:
12: trait foo2 {
13: public function foo() {
14: return 2;
15: }
16: }
17:
18:
19: class A extends foo {
20: use foo {
21: foo2::foo insteadof foo;
22: foo2::foo insteadof foo;
23: }
24: }
25:
26: ?>
27: --EXPECTF--
28: Fatal error: Class A cannot extend from trait foo in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>