Am 16.06.2020 um 21:30 schrieb Benas IML <benas.molis....@gmail.com>: > I put the original RFC on hold and created a new PR [0] for implicitly > enforcing `void` rules on both constructors and destructors. Note, that > this results in a BC break since it is no longer legal to return non-void > value from constructors/destructors. In other words, it is now illegal to > return something from ctor.
This is a huge BC break as up to now returning something in a constructor was silently ignored. Therefore I'd strongly advise to go through a deprecation phase (E_DEPRECATED or E_WARNING) before making it a fatal error so old software can be fixed first. - Chris -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php