This question already has an answer here:
- Array_filter and empty() 4 answers
Works: returns [false,null]
array_filter([1, 2, 3, false, null], function($value) {
return empty($value);
});
Does not Work:
array_filter([1, 2, 3, false, null], empty); // syntax error, unexpected ')',expecting '('
Why cant i just pass in the function as an argument?
</div>