Convert create_functions to true anonymous functions/closures

Making another PR since i kinda messed up the last one, with the recent bump in minimum PHP requirement as PHP 5.3, we can use closures and true anonymous functions, which are better, more readable and less memory intensive.