Use of Closures in Views |
I think that is a really neat. I must admit that I didn't know you could do that - assigning a function to a variable like that. It is actually looks quite amazing and I will be trying it out. A great way to clean up views, which although I usually can keep non-basic logic out, there are always the odd view that I think, eurrgh, could have done that a bit better.
Just reading about closures and anonymous funtions on php.net, have just found out about variable functions too although don't know when I would need them they look really exciting too: http://php.net/manual/en/functions.varia...ctions.php I wish I had done computing at Uni, might not be such a dunce now. So much to learn, so little spare time :-( Paul. |
Welcome Guest, Not a member yet? Register Sign In |