title: Object of class Closure could not be converted to string in: filename.
body: <pre><code>function convert($currencyType)
  {
      $that = $this;
      return $result = function () use ($that) 
      {
          if (!in_array($currencyType, $this-&gt;ratio))
                  return false;
  
          return ($this-&gt;ratio[$currencyType] * $this-&gt;money); //a float number
      };
  }
  
  $currency = new Currency();
  echo $currency-&gt;convert('EURO');
  </code></pre>
  
  <p>What's wrong?</p>
  
  <p>I'm getting the error message:</p>
  
  <pre><code>Catchable fatal error: Object of class Closure could not be converted to string
  </code></pre>