I am digging deeper into the array_filter() of php. I've understand the basic idea of it but fall into new problem.
$array = ['a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5];
$result = array_filter($array, function ($var){
return $var & 1;
});
If I dump the $result it looks like:
array:3 [
"a" => 1
"c" => 3
"e" => 5
]
I want to know how return $var & 1; works behind the scene in the callback function of array_filter() .
&operator does? php.net/manual/en/language.operators.bitwise.php