title: What does brackets like {variable}(variable|array) statement means in php?
body: <p>I couldn't google this one. The question;</p>
  
  <pre><code>public function processAPI() {
      if (method_exists($this, $this-&gt;endpoint)) {
          return $this-&gt;_response($this-&gt;{$this-&gt;endpoint}($this-&gt;args));
      }
      return $this-&gt;_response("No Endpoint: $this-&gt;endpoint", 404);
  }
  </code></pre>
  
  <p>Consider <code>$endpoint</code> is a variable and <code>$args</code> is an array of a class. We want to pass the variable <code>$this-&gt;{$this-&gt;endpoint}($this-&gt;args)</code> to <code>_response()</code> method. What does <code>{$this-&gt;endpoint}($this-&gt;args)</code> means in php syntax?</p>
  
  <p>The link of full definition of code: <a href="http://coreymaynard.com/blog/creating-a-restful-api-with-php/" rel="nofollow">http://coreymaynard.com/blog/creating-a-restful-api-with-php/</a></p>