note 73683 deleted from function.is-array by danbrown
| From: | danbrown@php.net | Date: | Sat, 27 Dec 2008 16:48:26 +0000 |
| Subject: | note 73683 deleted from function.is-array by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-148563@lists.php.net to get a copy of this message | ||
Note Submitter: bcuffley at netarus dot com
----
pardon my newbiness, but how about:
function is_seq_array( $php_val ) {
return is_array($php_val) && ($php_val === array_values($php_val);
}
this is taking for granted that array_values would return the "same" object and not a
copy, which it currently does for indexed arrays. If you don't like this assumption, just
compare the arrays by values.