I recently had to write a piece of code where I used the following; but it was very confusing for me and took me longer than I should

I keep getting lost by the negation and false turning into true and then back maybe. I end up solving these problems by trial and error.

Here is the code for getting rid of empty elements. NB, perhaps there are better code but I'm interested in knowing how to think this through

```
array_filter($array, "eliminate");

function eliminate($v)
{
   return !(empty($v));
}

```