You don't need to name it -- that would kinda mitigate the point of anonymous functions.
Instead, you can pass the output of create_function as a callback. So when you call addFunction(), give it whatever name you want, and then instead of passing in a callback, pass in the anonymous function.
Look at the create_function docs, this should give you some guidance.