Re: Scalar Type Hints v0.4
| From: | Rowan Collins | Date: | Wed, 18 Feb 2015 13:18:45 +0000 |
| Subject: | Re: Scalar Type Hints v0.4 | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-83063@lists.php.net to get a copy of this message | ||
Leigh wrote on 18/02/2015 13:10:
That's precisely the case for every existing user-defined function. Switching to PHP 7 won't suddenly add type hints to every function in every library and every existing bespoke code base, so there is no way to avoid that thought process.3b) Internal impact: Again, behavior remains unchanged unless theZEND_ARG_INFO struct has been modified to add proper typehints. If typehints have been added, then the more aggressive coersion rules apply during typehint validation. This leaves us in a state where some functions will have defined types with their aggressive coersion rules and some will not, and we can't expect users to remember which set of functions have been updated or not.
I think the rules need to apply to everything or nothing.The rules will apply to everything in the same way - if a function is typehinted, it behaves like so; if it's not, it behaves the same way it did in PHP 5. Regards, -- Rowan Collins [IMSoP]