note 90727 deleted from function.is-array by googleguy
| From: | googleguy@php.net | Date: | Wed, 16 Jan 2013 05:36:45 +0000 |
| Subject: | note 90727 deleted from function.is-array by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-193103@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
strictly speaking: array_diff_key does not return boolean, so using it in a comparison might
eventually be considered 'bad'.
perhaps add a bit more cruft...?
<?php
function is_assoc($var)
{
return is_array($var) AND ! empty ( array_diff_key($var,array_keys(array_keys($var))));
}
?>