I\'m trying to figure out how monkey patching works and how I can make it work on my own objects/methods.
I\'ve been looking at this lib, it does exactly what I want
You can do runtime class modification using runkit. More specifically, you can use runkit_method_redefine.