I've seen a couple bug fixes come up that create BC breaks for the code
reliant on the broken behavior.

JavaScript has a opt in strict mode for this. Perhaps PHP could do the
same. An opt in mode with the declare directive that turns on bug fixes
that are BC problems.

One recent example, the behavior of parse_url.

The ternary operator being backwards (right to left instead of left to
right as in all other languages) is another.

This approach lets some PHP 8 code be developed early by making troublesome
bug fixes available early.

The drawback is code bloat - both implementations would be in the code at
the same time. Also, core functions would need to check if the calling code
wants the normal or strict version of the function.

Or maybe namespaces and the use (use Strict; ) could handle this.

Reply via email to