Annotation of embedaddon/php/Zend/tests/traits/bug64070.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #64070 (Inheritance with Traits failed with error)
3: --FILE--
4: <?php
5: trait first_trait
6: {
7: function first_function()
8: {
9: echo "From First Trait\n";
10: }
11: }
12:
13: trait second_trait
14: {
15: use first_trait {
16: first_trait::first_function as second_function;
17: }
18:
19: function first_function()
20: {
21: echo "From Second Trait\n";
22: }
23: }
24:
25: class first_class
26: {
27: use second_trait;
28: }
29:
30: $obj = new first_class();
31: $obj->first_function();
32: $obj->second_function();
33: ?>
34: --EXPECT--
35: From Second Trait
36: From First Trait
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>