Bob Weinand wrote on 28/04/2016 16:49:
Regarding your suggestion, $foo instanceof Foo & Bar is conflicting with bitwise and 
here. Anyway, you already can $foo instanceof Foo && $foo instanceof Bar. Which is 
IMO just as easy, not conflicting and more flexible.


It's a shame that that's so verbose. It would be amazing to have something like Perl6's "Junctions": https://perlgeek.de/blog-en.cgi/perl-5-to-6/08-junctions.html

$foo instanceof any(Foo, Bar)

Well, I can dream... ;)


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

Reply via email to