Re: Proposal for a new array function

From: Date: Tue, 09 Feb 2016 09:27:43 +0000
Subject: Re: Proposal for a new array function
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-91141@lists.php.net to get a copy of this message
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]

« previous php.internals (#91141) next »