using create_function instead of anonymous function

using create_function instead of anonymous function, it can be run under PHP < 5.4.
I have test it on PHP(5.3.3) on ubuntu and PHP(5.2.2) on windows.