FAQ Database Discussion Community

How to use array_walk() with a function which belongs to a class?

I'm trying to apply a function to every item in an array in PHP. However, this function is contained in another file, containing a class. I have included the file, and the function can be called easily enough. It just won't work with array_walk. The way I'm trying to do...

array_walk only partially removes matches

Ran into a weird situation were using array_walk() will only partially remove matches from my method, not certain exactly what is going on. I am currently using PHP v5.6.4. The issue almost seems to be that it is only removing every secondary match. The kerning function private function strip(array $exceptions)...