On 16/07/15 11:26, Rowan Collins wrote: > Benjamin Eberlei wrote on 15/07/2015 21:19: >> >> But instanceof and anything related to Reflection or get_class or >> relevant code will fail on array. > > > Ah, yes, I hadn't thought of reflection type things. I don't think > instanceof would be a problem, because checking for any class or > interface other than Traversable would correctly return false; not sure > if it would make sense for "array() instanceof Traversable" to return > true or not... >
Maybe some pseudotype like callable (e.g. iteratable) makes more sense then? -- Regards, Mike -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php