Annotation of embedaddon/php/Zend/tests/traits/bugs/overridding-conflicting-property-initializer.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Properties are considered incompatible if they are different in any of their
3: defined characteristics. Thus, initialization values have to be equal, too.
4: --FILE--
5: <?php
6: error_reporting(E_ALL);
7:
8: trait foo
9: {
10: public $zoo = 'foo::zoo';
11: }
12:
13: class baz
14: {
15: use foo;
16: public $zoo = 'baz::zoo';
17: }
18:
19: $obj = new baz();
20: echo $obj->zoo, "\n";
21: ?>
22: --EXPECTF--
23: Fatal error: baz and foo define the same property ($zoo) in the composition of baz. However, the definition differs and is considered incompatible. Class was composed in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>