Before I begin, let me state that I agree entirely with others who have said that lambda functions and closures aren’t meant to allow you to dynamically extend classes at runtime, what I disagree with is the assertion that there are other ways of doing this. Currently there is no other way of doing this, and while I don’t think ...more
Posts Tagged with lambda
Dynamically adding methods and static methods onto classes at runtime in PHP5.3
March 5 -
0 Comments
Edit
Extending PHP5.3 objects at runtime with lambda functions
January 6 -
PHP 5.3 will include lambda functions and closures.
One interesting thing that will come from this will be the ability to dynamically add a method onto a class at runtime, by combining lambas with the magic __call method..well, at least a hack to make something like this....
Edit