I\'ve the following PHP method which is part of the codebase which was working fine:
Just skip $this argument, change
$this
function ($this) { return $this; }
to
function () { return $this; }
Look at Example #5 Automatic binding of $this on Anonymous functions page:
testing(); $function(); ?>