On Thu, Apr 14, 2016 at 3:12 AM, Derick Rethans <der...@php.net> wrote: > On Wed, 13 Apr 2016, Levi Morrison wrote: > >> As alluded to in an earlier email today[1] I am now moving the Union >> Types RFC[2] to the discussion phase. The short summary of the RFC is >> that it permits a type declaration to be one of several enumerated >> types. For example, this is a potential signature for a multi-type map >> routine: >> >> function map(callable $f, Array | Traversable $iterable); > > I think what I am missing in the RFC is behaviour with scalar (weak) > typehints, and which type the variable in a class would be converted to. > Take for example:
This is not missing in the RFC; see the section called Weak Scalar Types in Open Issues. However, it does not propose a solution. I have been assured by a few people that it is possible and it is just something that needs worked out. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php