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