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')); } assert(isIndexedArray(['a' => 1]));
based on tWhsR
Output for 7.0.0 - 7.2.0
Warning: assert(): assert(isIndexedArray(['a' => 1])) failed in /in/kG6qE on line 8
Output for 5.4.9 - 5.6.28
Warning: assert(): Assertion failed in /in/kG6qE on line 8
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/kG6qE on line 8
Process exited with code 255.