1--TEST-- 2#[\Override]: Redeclared trait method with interface. 3--FILE-- 4<?php 5 6interface I { 7 public function i(): string; 8} 9 10trait T { 11 public function i(): string { 12 return 'T'; 13 } 14} 15 16class C implements I { 17 use T; 18 19 #[\Override] 20 public function i(): string { 21 return 'C'; 22 } 23} 24 25var_dump((new C())->i()); 26 27echo "Done"; 28 29?> 30--EXPECT-- 31string(1) "C" 32Done 33