The `ReturnTypeWillChange` attribute in PHP is not limited to native PHP methods — it can also be applied to custom interfaces to bypass return type checks. While method signatures must normally be compatible with their interface definitions, this attribute allows a method to return a different type than declared. This has a security/correctness implication: return types can only be fully trusted after checking for the presence of this attribute.
Sort: