Re: [POC - Patch] Scalar Type Hinting - A-La zend_parse_parameters
| From: | Gustavo Lopes | Date: | Fri, 09 Mar 2012 08:42:39 +0000 |
| Subject: | Re: [POC - Patch] Scalar Type Hinting - A-La zend_parse_parameters | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-58811@lists.php.net to get a copy of this message | ||
On Fri, 09 Mar 2012 03:58:52 +0100, Ilia Alshanetsky <ilia@prohost.org> wrote:
My concern with this type of patch is that what you are proposing are not really hints, they are forced casts. As such they modify the data potentially leading to data loss.Yes. Just like what happens with internal functions nowadays and this hasn't been particularly problematic. That said, I think we could move to a mild BC breaking change for php-next that would make zpp stricter (with or without user-land scalar type hinting/coercion). -- Gustavo Lopes