public static function ArrayUtils::hasStringKeys in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/zendframework/zend-stdlib/src/ArrayUtils.php \Zend\Stdlib\ArrayUtils::hasStringKeys()
Test whether an array contains one or more string keys
Parameters
mixed $value:
bool $allowEmpty Should an empty array() return true:
Return value
bool
File
- vendor/
zendframework/ zend-stdlib/ src/ ArrayUtils.php, line 40
Class
- ArrayUtils
- Utility class for testing and manipulation of PHP arrays.
Namespace
Zend\StdlibCode
public static function hasStringKeys($value, $allowEmpty = false) {
if (!is_array($value)) {
return false;
}
if (!$value) {
return $allowEmpty;
}
return count(array_filter(array_keys($value), 'is_string')) > 0;
}