3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function isIndexedArray($array) { return !(bool)count(array_filter(array_keys($array), 'is_string')); } assert(isIndexedArray(['a' => ''])); assert(isIndexedArray(['a']));
based on QLfPU