On 06/06/2016 11:32, Christoph Becker wrote:
And we would run into similar issues as with the union types with regard to weak typing.
This is probably the biggest hurdle, IMO - regardless of the internal implementation, you've got to define exactly how the feature would work in the language itself.
A quick example off the top of my head (there are many other edge cases to cover):
class A { public function foo($bar) { echo 0; } public function foo(string $bar) { echo 1; } public function foo(int $bar) { echo 2; } } class B extends A { public function foo(float $bar) { echo 3; } } (new A)->foo(1.5); (new B)->foo(1.5); Regards, -- Rowan Collins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php