Ok, I cannot get this to work. I'm trying to override a static class as described in the documenation:
Patchwork\replace("A::__toString", function()
{
return "redefined";
});
But I only get:
Fatal error: Using $this when not in object context in \lib\Preprocessor.php(40) : eval()'d code on line 1
I'm on php 5.3.1