title: Access instance variable inside anonymous callback PHP
body: <p>Lets suppose i have a class &amp; i have to set instance variable from inside the callback.</p>
  
  <pre><code>class A{
     protected $user;
  
     public __construct(){
        /* Some function here which accept callback */
        StoreData(['name'=&gt;'Stackoverflow'],function($response){
             //how to assign value to $user here???
        });
     }
  }
  </code></pre>