Re: Change in type-hint representation
| From: | Dmitry Stogov | Date: | Thu, 12 Jan 2017 08:23:36 +0000 |
| Subject: | Re: Change in type-hint representation | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-97717@lists.php.net to get a copy of this message | ||
Hi Bob,
I don't exactly understand, what do you like.
Can you explain, or may be make it on top of this patch? (I think I'll commit it on Friday)
Thanks. Dmitry.
________________________________
From: Bob Weinand <bobwei9@hotmail.com>
Sent: Wednesday, January 11, 2017 9:13:33 PM
To: Dmitry Stogov
Cc: Derick Rethans; PHP internals list; Joe Watkins; Zeev Suraski; Anatol Belski (ab@php.net);
Nikita Popov; Xinchen Hui
Subject: Re: [PHP-DEV] Change in type-hint representation
> Am 11.01.2017 um 17:37 schrieb Dmitry Stogov <dmitry@zend.com>:
>
> The patch was updated according to feedback: added comments, better names and encapsulation,
> less magic, better code reuse, keep a free bit in zend_type for future extension.
>
> <https://gist.github.com/dstogov/1b25079856afccf0d69f77d499cb0ab1>
>
>
>
> <https://gist.github.com/dstogov/1b25079856afccf0d69f77d499cb0ab1>
>
>
> https://gist.github.com/dstogov/1b25079856afccf0d69f77d499cb0ab1
>
>
> Thanks. Dmitry.
Looks good so far…
Thought I've asked you before on IRC to somehow extract validation so that we don't have
to duplicate it everywhere.
Validate (and cast if necessary) given a zval, strict mode and the representation type (class
present as ce? as string?)
Also, perhaps a string representation of the type (reusable in reflection and in error messages)
Thanks,
Bob