Not directly related, but relevant for people who find this post (like me!) because they got the OP's error message:
If your function is in a namespace, you must include the namespace, e.g.
array_walk($myArray, "myNamespace\myFunction");