|
|
|
|
|
by Danack
4110 days ago
|
|
To explain the slightly horrible fact that there are two modes, strict and weak with strict mode being enabled on a per file basis; people just couldn't agree on whether the types should be strict or if they should use PHP's existing coercion rules. (Or even a 3rd new set of conversion rules, but lets ignore them). Having an optional mode per file allows: People who want to write code with strict types can do so.
People who want to write code with weak types can do so.
People who want to write code without these new fangled types can continue to do so. All without any issues of compatibility between running code on the current version of PHP and what will be the next one, and without any compatibility issues for libraries that are solely written in one mode, being used in applications that are written in the other mode. \o/ To be honest, I'm completely in the strict camp - but it's awesome that we've gotten a solution that should allow everyone to use the mode they want, without splitting the PHP ecosystem. |
|