Am 20.12.2017 um 13:56 schrieb Sebastian Bergmann:
On 12/19/2017 04:34 AM, Michael Moravec wrote:
I'd like to propose and discuss Mixed Typehint RFC for PHP 7.3:
https://wiki.php.net/rfc/mixed-typehint

"mixed" is too unspecific. I understand the reasoning behind wanting "mixed": to express explicitly that a type declaration was not forgotten.

I think that a "scalar" type that "groups together" bool, float, int, and string would make more sense. This would allow the expression that something is not an array, not an object, and not a resource

no - 'mixed' is for the same thing you have a comment "@param mixed $var" and that contains by definition array, object and resource when your method accepts any type and handles internally what to do with them

what you are talking about are unions statet multiple times in this thread

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to