3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function is_array_assoc($arr) { return array_keys($arr) !== range(0, count($arr) - 1); } $arr[1] = 'test'; var_dump(is_array_assoc($arr));
based on 8cSJL
Output for 4.3.0 - 7.1.0
bool(true)