Understanding self vs static in PHP: Why Your Interface Implementation May Fail
When working with interfaces and return types in modern PHP (especially PHP 8.0 and PHP 8.1+), you might run into a confusing but very real error:
Fatal error: Declaration of B::new(): B must be compatible with A::new(): static
This error trips up many developers because it