 <p>You cannot use <code>$this</code> as this is an explicit reserved variable for the class inside reference to the class instance itself. Make a copy to <code>$this</code> and then pass it to the <code>use</code> language construct.</p> <pre><code>class Foo { var $callbacks = array(); function __construct() { $class = $this; $this-&gt;callbacks[] = function($arg) use ($class) { return $class-&gt;bar($arg); }; } function bar($arg) { return $arg * $arg; } } </code></pre>