3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $values = array('1','2'); var_dump(!count(array_filter('is_array', $values))); var_dump(isset($values[0]), $values[0]); var_dump(isset($values[0][0]), $values[0][0]);
Output for 7.2.0 - 7.2.6
Warning: array_filter() expects parameter 1 to be array, string given in /in/XqieD on line 3 Warning: count(): Parameter must be an array or an object that implements Countable in /in/XqieD on line 3 bool(true) bool(true) string(1) "1" bool(true) string(1) "1"
Output for 5.3.0 - 7.1.20
Warning: array_filter() expects parameter 1 to be array, string given in /in/XqieD on line 3 bool(true) bool(true) string(1) "1" bool(true) string(1) "1"
Output for 4.3.2 - 5.2.17
Warning: array_filter(): The first argument should be an array in /in/XqieD on line 3 bool(true) bool(true) string(1) "1" bool(true) string(1) "1"
Output for 4.3.0 - 4.3.1
Warning: array_filter() [http://www.php.net/function.array-filter]: The first argument should be an array in /in/XqieD on line 3 bool(true) bool(true) string(1) "1" bool(true) string(1) "1"