On 03/06/2016 15:24, Thomas Bley wrote:
maybe easier to get a majority from voters if defining union types only in 
strict mode for 7.1?

No go, I'm afraid.

Strict types are opt-in at the point of calling the function, but union types are a feature of the declaration. If I write "function foo(int | string $a) {}", it is not up to me whether it's executed in strict mode or not.

We'd have to throw an error of "function %s cannot be called without strict types enabled", and that goes against the entire premise of strict types as implemented.

Regards,
--
Rowan Collins
[IMSoP]

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

Reply via email to