Yasuo Ohgaki wrote on 09/02/2016 02:52:
bool is_array(mixed $var [, long $type_of_array]);

where $type_of_array is bit flags such as PHP_ARRAY_REAL,
PHP_ARRAY_HASH, PHP_ARRAY, PHP_ARRAY_RECLUSIVE, etc.

I like this variant (although I don't like the term "real"). Unlike returning the type, it's still amenable to optimisation, because you're stating which checks you're interested in, so the implementation can pick the fastest version of those checks.

Regards,
--
Rowan Collins
[IMSoP]


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

Reply via email to