Is there an alternative to anonymous functions in versions of PHP previous to 5.3.0?
There is create_function but it generally isn't recommended. If you're using OOP, you'd be better off defining a one-off private member to use with a callback instead.