Using $this in closure by calling bindTo
<p>Consider the following code, why it still throws an error said <code>Using $this when not in object context</code> even I used the  <code>bindTo</code> function to set the context of <code>Class A</code></p>

<pre><code>class A {

    protected $name = 'a';

    function _do(Closure $something) {
        $var = function()use ($something) {
            // suppose to bind the instance of class a for $something
            $something-&gt;bindTo($this); 
            $something();
        };
        $var();
    }

}

$a = new A();
$a-&gt;_do(function() {
    // using $this as an instance of class A
    echo $this-&gt;name;
});
</code></pre>