title: Object of class Closure could not be converted into a string
body: <p>Alright so I am trying to use basic closures but it seems I am doing something wrong, I am constantly getting this error</p>
  
  <blockquote>
    <p>Catchable fatal error: Object of class Closure could not be converted
    to string in</p>
  </blockquote>
  
  <p>and this is the code</p>
  
  <pre><code>&lt;?php
  
      $var1 = 1;
      $var2 = 2;
      $var3 = rand(1,2);
  
  
      $calc = function() use ($var1, $var2, $var3) {
          if($var1&gt;=$var2) $total = $var1-$var2;
          else $total = ($var2-$var1)/$var3;
          return $total;
      };
  
      echo $calc;
  ?&gt;
  </code></pre>