3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // string, null, bool, float, largest specified previous index function isIndexedArray($array) { return !(bool)count(array_filter(array_keys($array), 'is_string')); } (isIndexedArray(null) === false);
based on 2e8Tl
Output for 7.2.0
Warning: array_keys() expects parameter 1 to be array, null given in /in/5Wj5n on line 5 Warning: array_filter() expects parameter 1 to be array, null given in /in/5Wj5n on line 5 Warning: count(): Parameter must be an array or an object that implements Countable in /in/5Wj5n on line 5
Output for 5.3.19 - 7.1.10
Warning: array_keys() expects parameter 1 to be array, null given in /in/5Wj5n on line 5 Warning: array_filter() expects parameter 1 to be array, null given in /in/5Wj5n on line 5