3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $serials = [ [ "foo" => "", "bar" => "" ], [ "foo" => "", "bar" => "" ], [ "foo" => "", "bar" => "" ], [ "foo" => "", "bar" => "" ], [ "foo" => "", "bar" => "" ], [ "foo" => "Don't remove", "bar" => "me!" ] ]; $filteredArray = array_filter (function ($item) { return !empty(array_values($item)); }, $serials); var_dump($filteredArray);
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.2.6
Warning: array_filter() expects parameter 1 to be array, object given in /in/empXC on line 32 NULL
Output for hhvm-3.15.4
Warning: array_filter() expects parameter 1 to be an array or collection in /in/empXC on line 32 NULL