The PHP 7 Revolution: Return Types and Removed Artifacts

There simply needs to be an ini switch which enables php4 constructors and all these issues are solved. It’s off by default and people with legacy code can enable it. Newbies don’t get confused, the manual can be simplified and anyone who really needs this behaviour can enable it.

I agree that breaking BC for everyone is not really a viable solution. It causes problems because someone can’t simply upgrade PHP on a site without investing time redeveloping parts. Clearly that’s not good from a business perspective. The result of this is that old PHP versions stay on servers running old sites, which then become security issues because updates are no longer issued for those versions.

Breaking BC for everyone is a bad move but so is keeping BC for everyone.

FWIW: It would take about 10 minutes to write a script that updated all PHP4 constructors in .php files to use the PHP5 __construct()