![]() ![]() | ![]() |
1.1 misho 1: --TEST-- 2: Bug #55524 Traits should not be able to extend a class 3: --FILE-- 4: <?php 5: 6: class Base {} 7: 8: trait Foo extends Base { 9: function bar() {} 10: } 11: 12: echo 'DONE'; 13: ?> 14: --EXPECTF-- 15: Fatal error: A trait (Foo) cannot extend a class. Traits can only be composed from other traits with the 'use' keyword. Error in %s on line %d