No, php's implementation of anonymous functions is not efficient. When create_function is called it stores that created function globally which doesn't allow garbage collection. Making it pretty much useless to use in callbacks or when defined within a loop. Watch the memory increase for the following test:while (true) {
create_function('', ' return 0; ');
}
No comments yet.